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,290 points
251 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,000 points

Related Questions In Data Analytics

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
10 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
45 views
0 votes
1 answer

What is a Random Walk model and how can you simulate it using R?

A random walk is a simple example ...READ MORE

answered Jul 3, 2018 in Data Analytics by DataKing99
• 8,100 points
293 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,000 points
238 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,000 points
132 views
+3 votes
3 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.