Numerically solve and plot solutions of a parametric ordinary
differential equations model of growth, death, and respiration of
macroinvertebrate and algae taxa dependent on pre-defined environmental
factors. The model (version 1.0) is introduced in Schuwirth, N. and
Reichert, P., (2013)
Developers instructions for building, installing and testing Streambugs R package sources.
You need a C compiler (recommended GCC >= 5 or LLVM >= 7); cf.
$ gcc --version
You also need an R (>= 3.0.2) installation on your computer; run:
which should download, build and install all R tools needed to build C/C++ based packages.
installing above R packages, together with all suggested dependencies (the
dependencies=TRUEkeword argument), takes some time, especially for the
devtoolspackage. You might opt for not installing suggested dependencies, and install the missing ones as you discover them.
R shell and load
$ R > library(devtools)
To create docs, build package and install it run in this folder:
> devtools::document() > pkg_src = devtools::build() > install.packages(pkg_src, repos=NULL, type="source")
To run tests, with the package as a working directory, run:
To check for CRAN submission, with the package as a working directory, run:
Build will create a zipped TAR file
PKGVER is the current package version. You can check this package for
CRAN submission by running in shell:
$ R CMD check --as-cran ../streambugs_$(VERSION).tar.gz
This creates the
streambugs.Rcheck/ folder which contains also a PDF file
streambugs-manual.pdf, that is the R vignette of the package.
R shell, after the build, run:
Remove build, packaging files, and CRAN check folder, i.e., relative to this folder, following files:
src/*.o src/*.so man/*.Rd ../streambugs_0.1.tar.gz streambugs.Rcheck/
To uninstall the package from your system run in