Meraki
April 17, 2018, 11:21am
1
Hello Group,
I am trying to develop an application where the user can upload the file using the file input and then I want to display the variables in the form of checkbox from the data frame.
https://shiny.rstudio.com/gallery/datatables-demo.html
I referred the above link. I would like to have something similar , but , i want to render the column names in the checkbox group.
The whole idea is to, display the column names in the checkbox and later the user could modify the datatype of the column.
Sample of code supporting this would be helpful.
anjana
September 10, 2018, 10:07am
2
hi meraki,
In order to create an input widget based on the uploaded data, you can use renderUI. Here is a slightly simplified version of the app from your question.
library(shiny)
library(DT)
library(tidyverse)
# Define UI for data upload app ----
ui <- fluidPage(
# App title ----
titlePanel(title = h1("Upload file and select columns", align = "center")),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
# Input: Select a file ----
fileInput("uploaded_file", "Choose CSV File",
multiple = TRUE,
accept = c("text/csv",
"text/comma-sep…
this link helps you try to follow the code in that ink if you get any errors,let me kow.....
anjana
September 10, 2018, 10:09am
3
i too have developed a same kind of applicaiton
have a look ....
...HI,
i am anjana trying to create a shiny application for the random forest algorithm by taking the users input csv, that part is shown in the above figure
now i have a problem with displaying the column names in the feature variables and target variables. i just given all the variable names to the both checkbox group and select input group.
i have a problem here when i select the feature variable , from the checkbox group it should automatically remove from the target variables(select input box). can any one help me with best lines.
# Define server logic required to draw a histogram
server <- function(input, output) {
# Read file ----
df <- reactive({
req(input$uploaded_fi…