When I read in csv files from Dropbox into R
, I right-click the file and click share Dropbox link
. I then have a URL something like:
I tested this with public OneDrive link:
[]
This works for me even when the public link changes.
OneFlow gave me "embed" in the URL, so I changed it to "download" and got the resul
None of those answers work for me, but I found an alternative solution that works.
Use the following code to download the file.
read_url_csv <- function(url, ...){
tmpFile <- tempfile()
download.file(url, destfile = tmpFile)
url_csv <- readr::read_csv(tmpFile, ...)
return(url_csv)
}
onedrive_url <- "INSERT LINK COPIED ABOVE"
csv <- read_url_csv(onedrive)
Reddit users recommend syncing One Drive files locally and reading the local files.
That worked for me.
You should now have the a local copy of those files stored on your PC and syncing online (just like Dropbox). You files will probably found in a sub-folder of this location:
C:\Users[Your user name]\