import_drivefile: Import file from a Google Drive folder

View source: R/import_drivefile.R

import_drivefileR Documentation

Import file from a Google Drive folder

Description

'import_drivefile' is a wrapper around 'googledrive::drive_download', useful for pulling multiple files from a given Google Drive folder (with a Google ID provided) to download by default to the Data folder of a project.

Usage

import_drivefile(drive_folder, filename, folderpath = "Data", zip = TRUE)

Arguments

drive_folder

Google id for Google Drive Folder

filename

exact name of file on Googl Drive to download

folderpath

path where you want file stored, default = "Data"

zip

should the file be zipped? default = TRUE

Value

stores file from Google Drive as a zipped file

Examples

## Not run: 
library(googledrive)
googledrive::drive_auth()
fldr <- "Spp-y8DYsdRTrzDqUmK4fX5v"
import_drivefile(fldr, "TestFile.csv")

## End(Not run)

USAID-OHA-SI/glamr documentation built on Oct. 1, 2024, 2:18 p.m.