Skip to content

Provides functions to work with the Regional Database & Estimation System (RDBES)

License

Notifications You must be signed in to change notification settings

ices-tools-dev/RDBEScore

Repository files navigation

R-CMD-check License

ICES Logo

RDBEScore

RDBEScore provides functions to work with the Regional DataBase and Estimation System (RDBES).

It is implemented as an R package and available on GitHub

Installation

RDBEScore can be installed from GitHub using the install_github command from the remotes package:

library(remotes)

install_github("ices-tools-dev/RDBEScore", build_vignettes = TRUE)

Usage

For a summary of the package see the following Vignettes:

browseVignettes(package = "RDBEScore")

References

RDBEScore (Development)

RDBEScore is developed openly on GitHub.

Feel free to open an issue there if you encounter problems or have suggestions for future versions.

The current development version can be installed using:

library(remotes)
install_github("ices-tools-dev/RDBEScore@dev")

If the installation fails due to R CMD, this alternative option can be used

library(remotes)
install_github("ices-tools-dev/RDBEScore@dev", build = FALSE)

On data.table usage

Objects of type data.table passed as parameters should be copied before modification. As an example:

function zeroIds(sl) {
  sl <- data.table::copy(sl)
  sl[,SLid:=0]
  sl
}

Now invocations of this function on SL tables will not alter the original copy.

Precommit-hook framework

For adhering to package styling guides it is advisable to use precommit checks while developing. In order to run lintr and styler (etc) before committing code, follow the instructions at the following address: https://github.com/lorenzwalthert/precommit#installation

  1. Check that python3 is installed and install if necessary
  2. Run pip install
    pip3 install pre-commit --user
  3. Install R precommit package
    install.packages("precommit")
  4. Run at the root of the git repository.
    library(precommit)
    precommit::use_precommit()
  5. Running git commit should run the various checks automatically. See the config file for all the checks.

Building binary packages

Building binary packages can be achieved by running the following commands.

Rscript.exe -e "roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace'))"
Rcmd.exe INSTALL --build --preclean .

Note to replace . with the relative path of the project if necessary. Also on some operating systems, Rcmd.exe is called Rcmd and Rscript.exe is Rcmd respectively.

In R-studio there is also a button on the build - tab: More -> Build Binary Package that builds the binary package.

About

Provides functions to work with the Regional Database & Estimation System (RDBES)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published