Author: C. Dardis christopherdardis@gmail.com
Version: 0.1
URL: http://github.com/dardisco/rp
Building and checking an R package can be tedious and
typically requires a variety of tools, both within R and on
the command line.
The rp package aims to do the needful with a single function!
The package assumes that you are using the following workflow:
- Writing an
Rpackage that follows best practice guidelines for submission to CRAN. - Using
roxygen2for package documentation. - Using
bashfor shell commands. This may work with other shell types.
On calling the function rp-rp, Emacs will open a new buffer
to display output from R and shell processes.
The functions on rp-function-sequence are then run.
This performs the following steps:
- Ensure
Ris the latest stable version (update if necessary) - Ensure all
Rpackages are the latest version. This can take a long time if you have many packages! - Use
roxygen2to update the package documentation. Note that you will still need to update the following files, as necessary:- DESCRIPTION
- NEWS
- README.md
- The package documentation file e.g.
packageName.Rwhich has a line inroxygenformat like "#' @docType package".
- Build the package using
R CMD build. This will take place in the parent directory of the package. - Check the package using
R CMD check --as-cran. - If
rp-check-rudist, also check the package withR Under development. This is the latest, unstable, release ofR. This last step is not recommended routinely but typically should be performed once it has passed all of the package checks performed by the stable version ofR.
This package can be installed using
(package-install-file "/path/to/rp.el")
Or place the folliwng in your init.el file:
(add-to-list 'load-path "~/path/to/directory")
(require 'rp)
To start the process use the rp-rp command, e.g. with
M-x mp-mp RET
This command should be called within the directory tree of
the R package. E.g. this can be called from a buffer which is a file
in the package or from a dired buffer which is in the package.
Many of the functions in the package can be called independently.
For example, you may wish to run rp-check-examples before
going through the whole sequence, as this is a common source
of ERRORs and WARNINGs.
This package was developed over a number of years to aid the
authors workflow when developign R packages.
Contributions are welcome.
Function-local/temporary variables are named using
as name1 e.g. v1, buffer1.
Converted from rp.el by el2markdown.