s3Save: Store and retrieve R objects on S3

Description Usage Arguments Value Author(s) References See Also

Description

These functions serialize and de-serialize R objects, storing the results on the S3 server. They are equivalent to the save and load functions, differing only in that the resulting content is stored and retrieved from the S3

Usage

1
2
3
4
s3Save(..., list = character(), file = stop("'file' must be specified"),
        ascii = FALSE, version = NULL, envir = parent.frame(),
         compress = !ascii, eval.promises = TRUE, precheck = TRUE,
          auth = getOption("AmazonS3"), access = NA, useFiles = FALSE)

Arguments

...

the R objects to serialize

list

a character vector listing the names of the R objects to serialize

file

the "bucket/object" identifier giving the location on S3 to store the object.

ascii,version,envir,compress,eval.promises,precheck

arguments passed directly to save.

access

a character vector. This is passed to addFile and controls who can access the file.

auth

a named character vector giving the AWS key and secret as a c(key = secret).

useFiles

a logical value indicating whether to explicitly save the R objects to a file and then upload that file. If this is FALSE, the objects are serialized in memory and the resulting raw vector stored. The results are the same regardless of whether we use files or not. There may be benefits to writing to a file if the objects are very, very large as serializing them in memory will essentially give us two copies in memory at the same time. Uploading from a file can avoid this.

Value

s3Save returns a logical value indicating whether the operation was successful. s3Load invisibly returns the names of the objects that were de-serialized.

In the future, we might return the name of the object from s3Save so that it can be used by the caller. If the operation was unsuccessful, we'll reaise an error.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://docs.amazonwebservices.com/AmazonS3/latest/gsg/

See Also

addFile


duncantl/RAmazonS3 documentation built on May 15, 2019, 5:26 p.m.