File is named varname.RData with an optional suffix before .RData
save_in_data_dir(var_name, suffix = "", data_path = "data",
package_dir = getwd(), envir = parent.frame())
character or symbol, e.g. "myvar" or myvar
, either of
which would find myvar
in the parent environment, and save it as
myvar.RData
in package_root/data
.
character scalar
path to data directory, default is data in current directory.
character containing the directory root of the package tree in which to save the data. Default is the current working directory.
environment in which to look for the variable to save
invisibly returns the data