Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading OneDrive files to R

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.

like image 347
phg Avatar asked Apr 11 '15 15:04

phg


1 Answers

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.

like image 115
Phuong Doan Avatar answered Sep 21 '22 14:09

Phuong Doan