Learn R Programming

icd (version 3.3)

save_in_data_dir: Save given variable in package data directory

Description

File is named varname.RData with an optional suffix before .RData

Usage

save_in_data_dir(var_name, suffix = "", data_path = "data",
  package_dir = getwd(), envir = parent.frame())

Arguments

var_name

character name of variable or its symbol either of which would find myvar in the parent environment, and save it as myvar.RData in package_root/data.

suffix

character scalar

data_path

path to data directory, default is data in current directory.

package_dir

character containing the directory root of the package tree in which to save the data. Default is the current working directory.

envir

environment in which to look for the variable to save

Value

invisibly returns the data