aou_bucket_to_workspace | R Documentation |
Retrieves a file from the workspace bucket and moves it into the current persistent disk where it can be read into R, e.g., using a function like read.csv().
aou_bucket_to_workspace(
file,
directory = FALSE,
bucket = getOption("aou.default.bucket")
)
file |
The name of a file in your bucket, a vector of multiple files, a directory, or a file pattern (e.g. ".csv"). |
directory |
Whether |
bucket |
Bucket to retrieve file from. Defaults to
|
This function retrieves a file from your bucket and moves it into
your workspace where it can be read into R, e.g., using a function like
write.csv()
. See
https://cloud.google.com/storage/docs/gsutil/commands/cp for details on
the underlying function.
Nothing
# save a file to the bucket
tmp <- tempdir()
write.csv(data.frame(x = 1), file.path(tmp, "testdata.csv"))
aou_workspace_to_bucket(file.path(tmp, "testdata.csv"))
# read the file back into the workspace
aou_bucket_to_workspace("testdata.csv")
# read in to your local environment
read.csv("testdata.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.