Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

R package not running preprocessing scripts in data-raw

After reading this and this, I thought that R scripts in data-raw are executed on the package build and data are moved to the data folder for lazyloading. But it’s not working in this test package.
What am I doing wrong here?

devtools::install_github("sjkiss/ces")
library(ces)
data('df')

I am getting R CMD check succeeded and I don’t get any warnings after installing the package.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Those scripts are not run automatically. The articles you point to just suggest you put the scripts there so you don’t loose them and it’s clear what they do. You need to run them yourself. They will not be run for you when you install packages.

For example at this link they have a section named "How do I put my data in the package" and step #4 instructs you to run or source the script manually. In R Pacakages 7.1.1 it’s a bit less explicit but again it’s just a suggestion of where to put the script. There’s nothing magic that happens when you put the files there.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading