-
Notifications
You must be signed in to change notification settings - Fork 0
/
installation.qmd
43 lines (31 loc) · 1.72 KB
/
installation.qmd
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
---
title: Installation
execute:
eval: false
---
All functions that are used repeatedly throughout this projec are implemented in an R package called `PRE`. The source code of this package is stored in a [publically accessible way on GitHub](https://github.com/Damian-Oswald/PRE). You can install the package directly from GitHub using the `install_github` function from the `remotes` package.
```{r}
install.packages("remotes")
remotes::install_github("https://github.com/Damian-Oswald/PRE")
```
Alternatively, you could download the GitHub repository and manually install the `PRE` package locally.
Once the package is installed, you can attach it to the search path in the usual way.
```{r}
#| eval: true
#| message: false
library(PRE)
```
## What do the various functions do?
The R code shown on this project help page is extremely simplified. If you want want to understand what a specific function of the `PRE` package does, simple visit the corresponding R help page. For example, you could read on the function `crossValidate` by using one of the the following commands.
```{r}
help("crossValidate", package = "PRE")
?crossValidate
```
If you want to jump really deep into a function, you could print it out in your console.
```{r}
#| eval: true
print(crossValidate)
```
Note this function source code output is lacking any comments. Those were automatically removed when compiling the R package. To see the commented source code, you'll have to jump into the package files, or visit the GitHub page. Simply use the following URL:
<https://github.com/Damian-Oswald/PRE/blob/main/R/crossValidate.R>
Notice how the base name (the last part of the URL) matches the function name. You can replace that by any function name of your liking.