CloudInterface: Class of objects for interacting with objects in a cloud...

Description Usage Arguments Format Examples

Description

A CloudInterface object holds the methods to read, write, and check for existence of objects in some external resource. We assume that objects are stored in some kind of key/value structure with one-to-one correspondence. We also assume that you are using disk space as an intermediary between the cloud storage system and your R session.

Usage

1

Arguments

get_fn

function. Used to get an object from the cloud.

put_fn

function. Used to put an object to the cloud.

exists_fn

function. Used to check if an object exists in the cloud.

Format

An object of class R6ClassGenerator of length 24.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  s3cmd <- CloudInterface$new(get_fn, put_fn, exists_fn)
  # read an object from S3 to disk
  s3cmd$get("path/to/iris", "~/files/iris.RDS")
  # write a file from disk to S3
  s3cmd$put("~/files/df2.RDS", "path/to/df2")
  # check if a key exists in S3
  s3cmd$exists("path/to/existing/file")

## End(Not run)

abelcastilloavant/csmpi documentation built on May 24, 2019, 7:21 p.m.