R package with generic analysis tools for CogLearn data generated with the CogLearn Unity package. Brought to you by Bachlab at Universität Bonn and University College London
Documentation: https://bachlab.gitlab.io/coglearn/coglearn/
You can install the development version of CogLearn by running the following code
# install.packages("devtools")
devtools::install_github("bachlab/CogLearn")
(1)the CogLearn package is not currently available on CRAN as it heavily uses tidyverse-style non-standard evaluation which is not accepted on CRAN. This may change in the future.
(2) After installation, run the following code to use the CogLearn package
library(tidyverse)
library(CogLearn)
Scripts containing the functions for this package are located in the R
directory. All functions here are added and available to use when you install the package.
So far no unit tests have been developed.
Several shortcut functions for development are in the shortcuts.R
script. You can use these to build documentation, the documentation website, run tests, etc.
General information on package development: https://r-pkgs.org/man.html
How to use tidyverse in a package: https://tidyr.tidyverse.org/articles/in-packages.html
Quick tips:
- Functions should be in scripts stored in the
R
folder. - If you need to use functions from another package, you should call them explicitly (e.g.
dplyr::filter(...)
). Dependencies should be added to the imports in the DESCRIPTION file. - You can use RStudio to generate documentation skeleton for functions.
- Follow the Tidyverse Style Guide.
tbc