-
Notifications
You must be signed in to change notification settings - Fork 2
/
make.R
37 lines (29 loc) · 1.24 KB
/
make.R
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
# Additional checks to run before `R-CMD-CHECK`
# Load packages
require(SpawnIndex)
# Build the raw data files
source(file = here::here("data-raw", "pars.R"))
# Build the read me file (may have to use RStudio "Knit" button)
rmarkdown::render(input = here::here("README.Rmd"))
file.remove(here::here("README.html"))
# Knit the technical report (may have to use RStudio "Compile PDF" button)
setwd(dir = here::here("tr"))
knitr::knit2pdf(input = "SpawnIndex.Rnw")
setwd(dir = here::here())
# Compile the supporting documents
devtools::build_manual(path = here::here("doc"))
devtools::build_vignettes(pkg = ".")
# Styler
styler::style_pkg()
styler::style_file(path = here::here("vignettes", "Introduction.Rmd"))
styler::style_file(path = here::here("man", "sticker", "sticker.R"))
styler::style_file(path = here::here("README.Rmd"))
styler::style_file(path = here::here("tr", "SpawnIndex.Rnw"))
# Lint
lintr::lint_package()
lintr::lint(filename = here::here("vignettes", "Introduction.Rmd"))
lintr::lint(filename = here::here("man", "sticker", "sticker.R"))
lintr::lint(filename = here::here("README.Rmd"))
lintr::lint(filename = here::here("tr", "SpawnIndex.Rnw"))
# Good practice (takes a while; restart R and require `SpawnIndex` first)
goodpractice::gp(path = ".")