packageData: Loading Package Data

Description Usage Arguments Value Examples

View source: R/devutils.R

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.

ldata loads a package data in the parent frame. It is a shortcut for packageData(list, ..., envir=parent.frame()).

Usage

1
2
3

Arguments

list

character vector containing the names of the data to load.

...

other arguments eventually passed to data.

envir

the environment where the data should be loaded.

Value

the loaded data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#----------
# packageData
#----------
## Not run:  mydata <- packageData('mydata') 

#----------
# ldata
#----------
## Not run: 
# in a package' source => won't issue a NOTE
myfunction function(){
	mydata <- ldata('mydata')
}

## End(Not run)

pkgmaker documentation built on May 2, 2019, 4:42 p.m.