1 License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-sa/4.0/).

2 R

3 Reading

4 Doing

None of this actually works in Rmarkdown because it is done from the command line, not from within R.

Getting a package from a Git repository

git clone git@github.com:cjgeyer/foo.git

(you may want to use a different URL https://github.com/cjgeyer/foo.git).

Checking the package, any of

cd foo/package
R CMD build foo
R CMD check foo_*.tar.gz
R CMD check foo_*.tar.gz --as-cran # should be done with R-devel
R CMD check foo_*.tar.gz --use-valgrind
R CMD check foo_*.tar.gz --use-gct

On my laptop R CMD check --as-cran reports a “note”

Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’

It is good practice to register native routines and to disable symbol search.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.

This is why the package fooRegister exists. It does call these routines as Writing R Extensions suggests.

Nevertheless, it seems (to the extent that the tests in the package actually test the package) that the package does work.

When you check a package you should also read the output of examples

less foo.Rcheck/foo-Ex.Rout

and the manual

evince foo.Rcheck/foo-manual.pdf