2

I would like to read a CSV file from a website into my R Shiny app.

This CSV file contains data that will regularly be updated on the website and so downloading the file once and accessing it on my local computer will not suffice.

Is a a way to automatically download and read the CSV file into the app every time is it launched?

Jonathan Eustace
  • 2,469
  • 12
  • 31
  • 54
Will.S89
  • 317
  • 5
  • 16

1 Answers1

1

If the website links and updates a csv file with a same filename, try this:

importedData <- read.csv(url("http://mywebsite.com/dataName.csv"))

Whenever you execute the above code, it will newly download the updated csv file and save it within the importData variable.

Refer to this link for more details. https://stackoverflow.com/a/6299291/5365437

Hope this helps.

Jason Jisu Park
  • 421
  • 2
  • 6