Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

>Solution :

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

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading