## Loading required package: methods
Core requirements:
DESCRIPTION
: package metadata
R/
: home of your R code (.R files)
man/
: documentation
NAMESPACE
: specifies what objects are exposed
Other helpful stuff:
vignettes/
: long-form documentation
tests/
: home of your unit tests
data/
: home of sample datasets
inst/
: anything else that should come along for the ride
src/
: compiled source code (e.g. C, C++ and/or Fortran)
The old way:
package.skeleton()
The new way:
Eddelbuettel’s pkgKitten
kitten()
as a drop in replacement for package.skeleton()
Hadley’s devtools
create()
setups the basics, lots of other add ons and tie-ins.The old way (via the shell):
R CMD build pkg
- construct a zipped file containing the package, source packages by default, but can compile and link source file if needed.
R CMD check pkg
- runs the extensive tests required by CRAN.
The new way (via devtools):
build()
/ check()
- same stuff but inside of the R session.Above materials are derived in part from the following sources: