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’.
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?
Would appreciate any guidance from experienced package developers.
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())
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()