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
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.