storage_save_rds {AzureStor} | R Documentation |
Save and load R objects to/from a storage account
Description
Save and load R objects to/from a storage account
Usage
storage_save_rds(object, container, file, ...)
storage_load_rds(container, file, ...)
storage_save_rdata(..., container, file, envir = parent.frame())
storage_load_rdata(container, file, envir = parent.frame(), ...)
Arguments
object |
An R object to save to storage. |
container |
An Azure storage container object. |
file |
The name of a file in storage. |
... |
Further arguments passed to |
envir |
For |
Details
These are equivalents to saveRDS
, readRDS
, save
and load
for saving and loading R objects to a storage account. They allow datasets and objects to be easily transferred to and from an R session, without having to manually create and delete temporary files.
See Also
storage_download, download_blob, download_azure_file, download_adls_file, save, load, saveRDS
Examples
## Not run:
bl <- storage_endpoint("https://mystorage.blob.core.windows.net/", key="access_key")
cont <- storage_container(bl, "mycontainer")
storage_save_rds(iris, cont, "iris.rds")
irisnew <- storage_load_rds(iris, "iris.rds")
identical(iris, irisnew) # TRUE
storage_save_rdata(iris, mtcars, container=cont, file="dataframes.rdata")
storage_load_rdata(cont, "dataframes.rdata")
## End(Not run)
[Package AzureStor version 3.7.0 Index]