-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
64 lines (39 loc) · 2.35 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
### CogLearn: Analysis R package
R package with generic analysis tools for CogLearn data generated with the CogLearn Unity package. Brought to you by [Bachlab](http://bachlab.org) at [Universität Bonn](https://www.uni-bonn.de/en) and [University College London](https://www.ucl.ac.uk)
Documentation: https://gitlab.com/bachlab/coglearn/coglearn/-/tree/master/man/index.html
### How to install the package from GitLab:
You can install the development version of CogLearn by following the steps below
```r
1. Clone the R package CogLearn from the gitlab using the following code (make sure the git is installed):
git clone https://gitlab.com/bachlab/coglearn/coglearn.git
2. Install the dependent R package vrthreat using the following code:
install.packages("devtools")
library(devtools)
devtools::install_git("https://gitlab.com/bachlab/erc/vrthreat.git", ref = "develop")
3. Install the CogLearn from your local repository
install_local("/path/to/your/local/repository/that store the CogLearn")
```
### NOTE
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
```r
library(vrthreat)
library(CogLearn)
```
### Scripts
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.
### Testing
So far no unit tests have been developed.
### Development
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](https://stackoverflow.com/a/30675146/5024009).
* Follow the [Tidyverse Style Guide](https://style.tidyverse.org/).
### Some types of functions and naming conventions
tbc