QingsaveRDS: saveRDS/readRDS

Description Usage Arguments Value Author(s) See Also Examples

Description

Serialization interface to read/write R objects to Qing

Usage

1
2
3
4
QingsaveRDS(x, bucket, object = paste0(as.character(substitute(x)), ".rds"),
  ...)

QingreadRDS(bucket, object, ...)

Arguments

x

For QingsaveRDS, a single R object to be saved via saveRDS and uploaded to Qing. x is analogous to the object argument in saveRDS.

bucket

Character string with the name of the bucket.

object

Character string with the object key, or an object of class “object”. In most cases, if object is specified as the latter.

...

Additional arguments passed to QingHTTP.

Value

For QingsaveRDS, a logical. For QingreadRDS, an R object.

Author(s)

Steven Akins <skawesome@gmail.com>

See Also

Qingsave,Qingload

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# create bucket
b <- put_bucket("myexamplebucket")

# save a single object to Qing
QingsaveRDS(x = mtcars, bucket = "myexamplebucket", object = "mtcars.rds")

# restore it under a different name
mtcars2 <- QingreadRDS(object = "mtcars.rds", bucket = "myexamplebucket")
identical(mtcars, mtcars2)

# cleanup
delete_object(object = "mtcars.rds", bucket = "myexamplebucket")
delete_bucket("myexamplebucket")

## End(Not run)

zhangxing-love/QingStorRSDK_0.1 documentation built on May 4, 2019, 10:17 p.m.