Learn R Programming

googledrive

Overview

googledrive allows you to interact with files on Google Drive from R.

Installation

Install the CRAN version:

install.packages("googledrive")

Or install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("tidyverse/googledrive")

Usage

Please see the package website: https://googledrive.tidyverse.org

Here’s a teaser that uses googledrive to view some of the files you see on https://drive.google.com (up to n_max = 25, in this case):

library("googledrive")
drive_find(n_max = 25)
#> # A dribble: 16 x 3
#>    name               id                                        drive_resource  
#>    <chr>              <drv_id>                                  <list>          
#>  1 chicken_sheet      1s0kEHcqG2PyciERoGq52L_Qwzp4y3__rBVKSx7E… <named list [35…
#>  2 r_logo.jpg         1wFAZdmBiSRu4GShsqurxD7wIDSCZvPud         <named list [41…
#>  3 THANKS             19URV7BT0_E1KhYdfDODszK5aiELOwTSz         <named list [40…
#>  4 googledrive-NEWS.… 1h1lhFfQrDZevE2OEX10-rbi2BfvGogFm         <named list [39…
#>  5 def                1ALSW_Nqs7FsPOcrJ6MqyBoRm03gansmn         <named list [33…
#>  6 abc                1o89YN5n4325GbUA86Wp6pRH3dsTsE5iC         <named list [33…
#>  7 BioC_mirrors.csv   13tMFbhAHoeHLFS5xu19GbDjf6GWJSxyN         <named list [39…
#>  8 Rlogo.svg          1lCQGxjyoc9mQz719I8sKil_m2Nuhw0Fq         <named list [41…
#>  9 DESCRIPTION        1KKYhtcdJMKh4WYeri5TOPEeAtzdN_cqV         <named list [40…
#> 10 r_about.html       1mHtQhvJyDk5dX9ktKbeIoVW-wwWK0__N         <named list [40…
#> 11 imdb_latin1.csv    1S5HxY7a-Jb_fV4C3T6fkGyPpXfI_yb4w         <named list [39…
#> 12 chicken.txt        1xMvlJHia_qYNZmucaStDcOF9A9PD4BOT         <named list [40…
#> 13 chicken.pdf        1au0aK6YCTra2sucTRus8ZaUhbaLpinTn         <named list [40…
#> 14 chicken.jpg        1-BF1c4kWCkkByQbcLT-b2Hv6vnVsbqa_         <named list [41…
#> 15 chicken.csv        12212CXY_TopUMIKYu_l8hU5UXI8lrzQF         <named list [39…
#> 16 chicken_doc        11GY4Q4BUG3m5U4CnZP564lYvGydvZe2XZOkwCfx… <named list [35…

Contributing

If you’d like to contribute to the development of googledrive, please read these guidelines.

Please note that the googledrive project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Privacy

Privacy policy

Copy Link

Version

Install

install.packages('googledrive')

Monthly Downloads

503,078

Version

2.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

July 8th, 2021

Functions in googledrive (2.0.0)

dribble-checks

Check facts about a dribble
as_shared_drive

Coerce to shared drive
as_dribble

Coerce to a dribble
drive_auth

Authorize googledrive
dribble

dribble object
drive_auth_configure

Edit and view auth configuration
drive_about

Get info on Drive capabilities
as_id

Extract and/or mark as file id
deprecated-team-drive-functions

Deprecated Team Drive functions
drive_browse

Visit Drive file in browser
googledrive-package

googledrive: An Interface to Google Drive
%>%

Pipe operator
drive_read_string

Read the content of a Drive file
drive_cp

Copy a Drive file
drive_create

Create a new blank Drive file
drive_put

PUT new media into a Drive file
drive_download

Download a Drive file
drive_fields

Request partial resources
drive_ls

List contents of a folder or shared drive
drive_deauth

Suspend authorization
drive_link

Retrieve Drive file links
drive_empty_trash

Empty Drive Trash
drive_trash

Move Drive files to or from trash
drive_token

Produce configured token
googledrive-configuration

googledrive configuration
drive_mv

Move a Drive file
drive_rm

Delete files from Drive
drive_share

Share Drive files
drive_find

Find files on Google Drive
drive_publish

Publish native Google files
googledrive-deprecated

Deprecated googledrive functions
drive_examples

Example files
drive_extension

Lookup extension from MIME type
drive_mime_type

Lookup MIME type
drive_endpoints

List Drive endpoints
shared_drive_update

Update a shared drive
drive_get

Get Drive files by path or id
shared_drive_rm

Delete shared drives
shared_drive_get

Get shared drives by name or id
drive_mkdir

Create a Drive folder
drive_update

Update an existing Drive file
drive_upload

Upload into a new Drive file
drive_rename

Rename a Drive file
drive_reveal

Add a new column of Drive file information
shared_drive_create

Create a new shared drive
shared_drive_find

Find shared drives
shared_drives

Access shared drives
request_generate

Build a request for the Google Drive API
request_make

Make a request for the Google Drive v3 API
drive_has_token

Is there a token on hand?
expose

An expose object
shortcut_resolve

Resolve shortcuts to their targets
drive_user

Get info on current user
shortcut_create

Create a shortcut to a Drive file