Reading OneDrive files to R

hgeop picture hgeop · Apr 11, 2015 · Viewed 12.8k times · Source

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:

https://www.dropbox.com/blahhhhhhhhhh.csv?dl=0

So I change it to: read.csv("http://dl.dropbox.com/blahhhhhhhhhh.csv?dl=0", ...) and it works without the need to use any packages etc.

Is there a way to read files from OneDrive in a similar manner?

https://onedrive.live.com/blahhhhhhhhhhhhhhhhccsv

As when I try to read it into R it doesn't give me the data frame I'm expecting from the file.

Answer

Phuong Doan picture Phuong Doan · Sep 11, 2017

I tested this with public OneDrive link:

  • download the file
  • get the URL in download page (Ctrl+J in Chrome):

[enter image description here]

  • paste the URL in read.csv("url...")

This works for me even when the public link changes.