download_all_files_in_folder: Download all the files in a google drive folder.

Description Usage Arguments Value Examples

Description

dribble_data should be obtained using drive_ls.

Usage

1
2
3
4
5
6
7
8
download_all_files_in_folder(
  dribble_data,
  folder,
  pattern = NULL,
  negate = FALSE,
  overwrite = FALSE,
  ...
)

Arguments

dribble_data

Data frame of class dribble.

folder

Path to local folder to download data.

pattern

Optional grep pattern; only file names matching this pattern will be included.

negate

Logical; should only file names that don't match the pattern be included instead?

overwrite

Logical; should existing files be overwritten?

...

Other arguments; not used by this function, but meant for workflow tracking with drake.

Value

Data frame of class dribble including the files that were downloaded

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(tidyverse)
library(googledrive)
# Make a temporary drive folder
folder <- drive_mkdir("temp")
# Upload example data
files <- map(c(drive_example("chicken.csv"), drive_example("chicken.txt")),
            drive_upload, path = folder)
# Download all files in the folder
folder_contents <- drive_ls("temp")
download_all_files_in_folder(folder_contents, tempdir(), overwrite = TRUE)

## End(Not run)

joelnitta/jntools documentation built on Jan. 17, 2022, 3:05 p.m.