-
Notifications
You must be signed in to change notification settings - Fork 2
/
08-check.Rmd
53 lines (35 loc) · 904 Bytes
/
08-check.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
```{r echo = FALSE}
knitr::opts_chunk$set(
comment = "#>",
warning = FALSE,
message = FALSE
)
```
# Package checks {#package-checks}
Now that we've built an R package, we need to check it.
Run R check often to make sure you
aren't breaking something in your package.
## RStudio
Keyboard shortchuts: shift + command + E (shift + ctrl + E)
OR use buttons
## command line
from your shell
```sh
Rscript -e 'devtools::check()'
```
OR from within R
```r
devtools::check()
```
OR with the newer package [rcmdcheck](https://github.com/r-lib/rcmdcheck)
```r
rcmdcheck::rcmdcheck()
```
## the really hard way
```sh
R CMD BUILD your_package_folder
R CMD CHECK your_package_name.tar.gz
```
## see also
* R-hub: `rhub` package (many different fxn options), website: <https://builder.r-hub.io/>, R pkg <https://cran.rstudio.com/web/packages/rhub/>
* win-builder: via `devtools::build_win()`