View source: R/drive_transfer_bulk.R
cloud_drive_upload_bulk | R Documentation |
This function streamlines the process of uploading multiple
files from the local project folder to the project's designated Google
Drive folder. By using cloud_local_ls, you can obtain a dataframe
detailing the contents of the local folder. Applying
cloud_drive_upload_bulk
to this dataframe allows you to upload all listed
files to Google Drive.
cloud_drive_upload_bulk(content, quiet = FALSE, root = NULL)
content |
(data.frame) Output of |
quiet |
All caution messages may be turned off by setting this parameter
to |
root |
Google Drive ID or URL of the project root. This serves as the
reference point for all relative paths. When left as |
Invisibly returns the input content
dataframe.
# create toy plots: 2 png's and 1 jpeg
dir.create("toy_plots")
png("toy_plots/plot1.png"); plot(rnorm(100)); dev.off()
png("toy_plots/plot2.png"); plot(hist(rnorm(100))); dev.off()
png("toy_plots/plot3.jpeg"); plot(hclust(dist(USArrests), "ave")); dev.off()
# upload only the two png's
cloud_local_ls("toy_plots") |>
dplyr::filter(type == "png") |>
cloud_drive_upload_bulk()
# clean up
unlink("toy_plots", recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.