Dynamically select element from a list and work with it - Shiny R

0 votes
I have a list of items and I want to use that list in my Shiny R dashboard. I'm trying to select an element from the list and work with it or apply some function like lm on it. Is that possible?
Dec 5, 2018 in Data Analytics by Ali
• 10,450 points
395 views

1 answer to this question.

0 votes

Follow these steps:

  • Import the data into R
  • Check if the list of elements is in fata.frame format, if not convert it into it.
  • To dynamically select elements use selectInput function.
  • To dynamically use the table, use the function renderTable.

Something like this:

ui.R

box(
     selectInput("ip_name", "Select input:", choices = names(l))

server.R

Element <- reactive({
    input$ip_name
  })
 output$table <- renderTable({
      data.frame(l[[input$ip_name]])
    })
answered Dec 5, 2018 by Maverick
• 10,040 points

Related Questions In Data Analytics

0 votes
0 answers

Split a string and store it in multiple columns from a field in R

How to Split a string and store ...READ MORE

Jun 28 in Data Analytics by Anand
22 views
0 votes
1 answer
0 votes
1 answer

How can I use R to list all files with a specified extension ?

fls <- list.files(pattern = "\\.dbf$") $ at the ...READ MORE

answered May 10, 2018 in Data Analytics by zombie
• 3,690 points
16 views
0 votes
1 answer

How to filter a data frame with dplyr and tidy evaluation in R?

Requires the use of map_df to run each model, ...READ MORE

answered May 16, 2018 in Data Analytics by DataKing99
• 8,100 points
61 views
0 votes
1 answer

Error saying "could not find function "shinyUI"" in shiny R

Its a small spelling mistake that you've ...READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,040 points
309 views
0 votes
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,040 points
168 views
+3 votes
3 answers