accessing sysdata.rda within package functions

后端 未结 1 1977
别跟我提以往
别跟我提以往 2021-01-01 16:23

I thought that putting an internal dataset for a package into R/sysdata.rda would make the data accessible to my functions. But I can\'t seem to figure out how

相关标签:
1条回答
  • 2021-01-01 16:43

    If your package name is somepackage and the object saved was nhanes_files with devtools::use_data(nhanes_files, internal = TRUE) then you can access this in your functions by calling somepackage:::nhanes_files.

    0 讨论(0)
提交回复
热议问题