save: Save R objects as an encrypted file.

View source: R/main.R

saveR Documentation

Save R objects as an encrypted file.

Description

This function allows you to save encrypted R objects. R objects are taken from the environment.

Usage

save(..., list = character(), file = stop("'file' must be specified"),
  envir = parent.frame(), password = NULL)

Arguments

...

the variables to be saved.

list

an optional list of names that identity the R objects to store.

file

the path to the file.

envir

the environment the variables are token from.

password

the password to use, if NULL, the package tries to ask for a password.

Details

Uses AES 256-bit encryption (in CBC mode) with a SHA-256 hashed password.

Note

Asking for a password relies on being in interactive() mode (RStudio, RGui). Outside interactive() mode (rmarkdown, knitr), the package "getPass" is required.

Examples

df <- data.frame(rnorm(100))
save(df, file="mydata.Rdata")


Gootjes/encryptr documentation built on Feb. 15, 2024, 12:14 p.m.