From the course: Building Data Apps with R and Shiny: Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use rhandsontable to collect data

Use rhandsontable to collect data

From the course: Building Data Apps with R and Shiny: Essential Training

Start my 1-month free trial

Use rhandsontable to collect data

- [Martin] Often when building a Shiny app, you want to collect data from your users. It's particularly useful to be able to do this within a table that your users type into. This is most easily achieved by using the rhandsontable html widget package. Let's take a look at how we do that by going to our exercise files, folder 0704, and we'll open our R Studio project. Let's open our server.r file, and our ui.r file as well, and let's run our app to see what we're dealing with. So this is a time tracker, and we're asked to insert data into our table, so I'll say that I worked on Project A for five hours. If I wanted to add additional rows to my table, I'd right-click in a row, and click insert row below. Now if I click on analyze data, what I want to happen is a chart to appear below which tells me information about the data I've inputted. But, we haven't plumbed together our shiny app yet, so let's close the shiny app, and return to the server.r file. So, on lines 21 through 25, we…

Contents