Learn R Programming

⚠️There's a newer version (2.0.0) of this package.Take me there.

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://tidyverse.github.io/googledrive/

Here's a teaser that uses googledrive to view some of the files you see on https://drive.google.com:

library("googledrive")
drive_find(n_max = 25)
#> Auto-refreshing stale OAuth token.
#> # A tibble: 25 x 3
#>                            name
#>  *                        <chr>
#>  1               chicken-rm.txt
#>  2                  chicken.jpg
#>  3           README-mirrors.csv
#>  4           README-mirrors.csv
#>  5                          def
#>  6                          abc
#>  7               folder1-level4
#>  8               folder1-level3
#>  9      cranberry-TEST-drive-ls
#> 10 folder1-level2-TEST-drive-ls
#> # ... with 15 more rows, and 2 more variables: id <chr>,
#> #   drive_resource <list>

Contributing

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

Copy Link

Version

Install

install.packages('googledrive')

Monthly Downloads

624,767

Version

0.1.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jennifer Bryan

Last Published

January 24th, 2019

Functions in googledrive (0.1.3)

as_dribble

Coerce to Drive files
as_team_drive

Coerce to Team Drive
drive_extension

Lookup extension from MIME type
drive_fields

Request partial resources
drive_token

Produce Google token
team_drive_update

Update an existing Team Drive
dribble-checks

Check facts about a dribble
drive_trash

Move Drive files to or from trash
drive_api_key

Retrieve API key
drive_auth

Authorize googledrive
team_drives

Access Team Drives
drive_auth_config

View or set auth config
drive_browse

Visit Drive file in browser
drive_empty_trash

Empty Drive Trash
drive_mkdir

Create a Drive folder
as_id

Extract and/or mark as file id
drive_download

Download a Drive file
drive_cp

Copy a Drive file
drive_mime_type

Lookup MIME type
drive_about

Get info on Drive capabilities
dribble

dribble object
drive_mv

Move a Drive file
drive_find

Find files on Google Drive
drive_get

Get Drive files by path or id
drive_publish

Publish native Google files
drive_deauth

Suspend authorization
drive_share

Share Drive files
drive_rm

Delete files from Drive
drive_upload

Upload into a new Drive file
drive_update

Update an existing Drive file
drive_link

Retrieve Drive file links
token_available

Check token availability
generate_request

Build a request for the Google Drive v3 API
drive_ls

List contents of a folder or Team Drive
drive_user

Get info on current user
googledrive-package

googledrive: An Interface to Google Drive
expose

An expose object
team_drive_get

Get Team Drives by name or id
team_drive_create

Create a new Team Drive
drive_example

Get path to example file
team_drive_rm

Delete Team Drives
drive_endpoints

List Drive endpoints
team_drive_find

Find Team Drives
is_legit_token

Check that token appears to be legitimate
drive_reveal

Add column(s) with new information
drive_rename

Rename a Drive file
make_request

Make a request for the Google Drive v3 API
%>%

Pipe operator
process_response

Process a response from the Google Drive v3 API