packageData: Loading Package Data
Description
Loads package data using data
, but allows the user to avoid
NOTEs for a ‘non visible binding variable’ to be thrown when checking a package.
This is possible because this function returns the loaded data.
Usage
packageData(list, envir = .GlobalEnv, ..., options = NULL,
stringsAsFactors = getOption("stringsAsFactors", TRUE))ldata(list, ...)
Arguments
list
character vector containing the names of the data to load.
...
other arguments eventually passed to data
.
options
list of R options to set before calling data
.
This may be useful the data is shipped as an R script.
stringsAsFactors
logical that indicates if character columns of tabular data should be
converted into factors.
Examples
Run this code# NOT RUN {
# }
# NOT RUN {
mydata <- packageData('mydata')
# }
# NOT RUN {
# }
# NOT RUN {
# in a package' source => won't issue a NOTE
myfunction function(){
mydata <- ldata('mydata')
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab