I am trying to use built-in data in an R package (this package here.
I've used the usethis::use_data_raw()
and usethis::use_data()
(formerly from the devtools package) to set up a directory (and script) to process the raw data and the directory with the raw data itself (see data-raw
and data
here.
However, when I load the package and then type the name of the data - inaugural_addresses
- it does not load. However, when I load the package and run data("inaugural_addresses")
, it loads the data.frame
into the environment, e.g.:
> inaugural_addresses
Error: object 'inaugural_addresses' not found
> data("inaugural_addresses")
# this loads the data.frame into the environment
It seems like I must be not documenting something correctly - but I can't find out what. How can I load the built-in data without the use of the data()
function?