简体   繁体   中英

How to upload a CSV file into R/shiny and automatically populate selectors based on column headers

I want to upload a csv file from a \data folder inside the R project.

So far I've been reading questions, but most answers seemed a bit too fancy, with user interaction when selecting a data file. I simply want R Shiny to read a data file (just the one) without any user interaction.

I have the standard files ui.R and server.R I place them in a working directory.

I have a csv file with data which I place in a subdirectory called 'data'

I might be missing something, but this should work right?

df = rio::import("./data/my_filename.csv")

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM