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
• 11,300 points
2,037 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,840 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, 2019 in Data Analytics by Anand
253 views
0 votes
1 answer

How do I remove an element from a list by index in R?

Use list[index] = NULL The list value will ...READ MORE

answered Oct 31, 2019 in Data Analytics by Cherukuri
• 32,910 points
523 views
0 votes
1 answer

How to remove an element from a list in R?

Hi@akhtar, You can remove a value from a ...READ MORE

answered Oct 30, 2020 in Data Analytics by MD
• 95,060 points
896 views
0 votes
1 answer
+1 vote
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,840 points
1,146 views
+1 vote
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,840 points
903 views
+4 votes
3 answers