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,360 points
3,694 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

R: use of "where" to select rows by matching an element from a list

I'm trying to utilise R's "where" function ...READ MORE

Jun 10, 2022 in Data Analytics by Avinash
• 1,260 points
756 views
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 29, 2019 in Data Analytics by Anand
851 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
• 33,030 points
2,245 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,460 points
4,288 views
+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
2,568 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 29, 2018 in Data Analytics by Maverick
• 10,840 points
3,536 views
+4 votes
3 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP