R How to read a file from google drive using R

后端 未结 2 1411
渐次进展
渐次进展 2020-12-31 16:08

I would like to read in R a dataset from google drive as the screenshot indicated.

Neither

url <- \"https://drive.google.com/file/d/1AiZda_1-2nwr         


        
2条回答
  •  迷失自我
    2020-12-31 16:29

    • The google drive share link is not the direct file link, so 1. download.file 2. RCurl first method in accepted answer only download the web page showing the file, not file itself. You can edit the downloaded file and see it's a html file.

    • You can find out the actual direct link to file with this. With the direct link all the regular download methods will work.

    • For very detailed discussions about getting the direct link or downloading it, see this question.

    • Google drive api require client to sign in, so googledrive package also ask you to sign in google if not already signed in.

提交回复
热议问题