This lets you continue package development on planes. If you want to skip the portion of a package check where R connects to CRAN (because you’re behind a proxy or you don’t have an internet connection) run rcmdcheck::rcmdcheck(repos = FALSE).Thank you to the #rstats Twitter for helping me out with this one! This partially hides the documentation from regular users, while still allowing interested users and developers to access it. Use the internal Roxygen tag for documented internal functions, that is, functions without an tag.After that first command, however, devtools::check() started documenting. This isn’t always obvious for a brand new package, so I found that I had to run devtools::document() initially. Running devtools::check() (as opposed to R CMD CHECK) will automatically run devtools::document() before the package check if devtools can see that you’re using Roxygen.For every call afterwards, that package has already been loaded. R loads the package on the first use of a double colon function, but doesn’t attach it. I’ve heard it claimed before that it’s inefficient to use double colons like readr::read_csv() because R “loads the package every time”.Attaching a package also loads it, and this is what happens when you run the library function. There’s a difference between attaching and loading a package.I’ve picked up a lot about package development, so I’m documenting some of trickier things that I’ve learnt.Ī great resource for package development is Hadley’s book. First I was exploring GitHub actions with the lovely people at the rOpenSci OzUnconf, and then I was off to San Francisco to learn about Building Tidy Tools with the Wickham siblings. The last few weeks have been all about R package development for me.
0 Comments
Leave a Reply. |