Description Usage Arguments Examples
This function grabs a dataset from Google Drive and returns it as an R dataframe object. You might need to run 'drive_auth()' before running this to get your Google account credentials set up.
1 |
url |
The link to the desired file obtained by "get shareable link" (the user must have at least viewing access to the file). Can be either a '.csv', Google Sheets, or '.Rda' file. |
filetype |
A character vector specifying the filetype. Either "csv", "Sheet", or "Rda". |
... |
Additional arguments to supply to 'read_csv()'. |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# Grab a very useful dataset
grab_data(url = "https://drive.google.com/open?id=1JnkQddF8FmY0YsXZSWBanQNPjZ_LBIQUGi_s43vNDIQ",
filetype = "Sheet")
# Send extra arguments to read_csv
grab_data("https://drive.google.com/file/d/10j5nM5Wu27S5-kIsf1x6HlkLpOKvcqhE/view?usp=sharing",
"csv",
col_types = cols(compelling_narrative = col_character(),
index = col_integer()))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.