Error During Package Build

Hello

I am developing an R package & faced an error when building the package. The build process stops with a warning message: ‘non-standard file/directory found’. :upside_down_face:

I’m not sure which files might be causing the issue; as I followed the usual package structure guidelines. I have checked 1  Packaging Guide – rOpenSci Packages: Development, Maintenance, and Peer Review documentation guide for reference but still need help.

Could this be due to extra files like data / documentation that aren’t typically included?
What are the best practices for organizing the package directory to avoid this error? :thinking:

Would appreciate any guidance from experienced package developers.

Thanks! :slightly_smiling_face:

If you run devtools::check() locally, it should tell you which files it is complaining about. You can add those to a .Rbuildignore file to not include them in the built package. Extra documentation should probably be included as a vignette (usethis::use_vignette()) and data should be included in data/ or possibly inst/ (see R packages and usethis::use_data())

2 Likes

Hi

The build process should indeed have mentioned what files are at fault. You could use {rcmdcheck}: https://rcmdcheck.r-lib.org/ to store the check results as an object, this is sometimes easier to read.

If you post your R CMD CHECK results here, we can help interpret them. You can get those with devtools::check()

Is your package stored in a public repository?

2 Likes