Relative Content

Tag Archive for rshinyrhandsontable

making a data frame reactive to SelectInput()

I have two data frames df and df2. As per code below df2 should contain data from df when filtered by dateRangeInput(). However, df2 is not reacting to a selected date range when new rows added to df. What am I missing in the code below?

data filtering based on dateRangeInput()

I have two data frames “df” and “df2”. I want data of the “df” to be rearranged as the “df2” by a selected date range in dateRangeInput(). However, it is simply not working. I cannot figure out what is wrong with the script below.

How to dynamically set number of decimal places using rhandsontable?

In the below MWE code I’m trying to have a user input (deciInputs) set the number of decimal places rendered in the rhandsontable table. As the code is drafted, strangely, a user input of 0 renders 1 decimal place in the table, setting the user input to 1 renders 0 decimal places, and setting the user input to any value > 1 (let’s call this user input value “x”) results in rendered decimal places of x – 1 (where, for example setting x = 3 results in 2 rendered decimal places). Try it out, you’ll see. Further, for example if the user input is set to 1, I’d like a user input of 12 directly into the table itself (overriding the default value) to be rendered as 12.0, a user input of 12.1 rendered as 12.1, a user input of 12.12 rendered as 12.1, a user input of 12.129 rendered as 12.1, etc. and this doesn’t work quite right either. What am I doing wrong in the below code?