I am trying to have a user select a data frame and then have it be rendered as a table.
Here is the code I have.
---
title: "Untitled"
date: "2/24/2022"
output: html_document
runtime: shiny
---
```{r}
selectInput(inputId = "dataset",label = "Choose Data Frame", choices = c(mtcars, iris, cars))
renderTable({
dataset <- get(input$dataset, choices = c(mtcars, iris, cars))
})
```
Although for some reason the inputs are the column names of each dataset.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.