-
Notifications
You must be signed in to change notification settings - Fork 1
/
pkg_pipeline.R
94 lines (69 loc) · 2.25 KB
/
pkg_pipeline.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
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
library(usethis) # https://usethis.r-lib.org/reference/index.html
#### Infrastructure ####
use_gpl3_license(name = "Oliver Pfaffel") # required to share improvements
use_package("rlang", "Imports")
use_package("ClusterR", "Imports")
use_package("copula", "Imports")
use_package("dplyr", "Imports")
use_package("magrittr", "Imports")
use_package("psych", "Suggests")
use_package("tidyr", "Suggests")
use_package("mclust", "Suggests")
use_package("ggplot2", "Suggests")
use_package("Hmisc", "Suggests")
use_package("tictoc", "Suggests")
use_package("corrplot", "Suggests")
use_pipe() # Use %>%
### create R files
use_r("ClustImpute")
use_r("Missing_simulation")
### Documentation
use_news_md()
use_readme_md()
use_vignette("Example_on_simulated_data")
use_spell_check() # requires spelling package
## Tests
use_testthat()
use_test("MCAR")
use_test("no_NAs")
use_test("only_NAs")
use_test("dimensions")
use_test("prediction")
use_test("var_reduction")
use_test("plot_fun")
use_coverage() # Test coverage
## Package website
# use_pkgdown() # https://github.com/r-lib/pkgdown
# pkgdown::build_site()
# check into git, then go to settings for your repo and make sure that the GitHub pages source is set to “master branch /docs folder”. Be sure to update the URL on your github repository homepage so others can easily navigate to your new site.
## github
use_git() # git remote add origin https://github.com/o1iv3r/ClustImpute.git
# use_github()
## Build ignore --> CRAN notes
use_build_ignore(c("pkg_pipeline.R"))
## Citation
use_citation()
#### Before ANY changes are made ####
# new branch
## Increment version
usethis::use_version() # increments the "Version" field in DESCRIPTION, adds a new heading to NEWS.md (if it exists), and commits those changes (if package uses Git).
#### Manual deployment ####
## Document and check package
# restart R session first
devtools::test()
devtools::spell_check()
devtools::document()
devtools::check(document = FALSE)
# finally, either release
devtools::release()
# or build and upload manually
devtools::build()
#### CI ####
# optional: add dev branch to travis.yml
use_travis()
use_build_ignore("travis.yml")
use_coverage()
use_build_ignore("codecov.yml")
#### Tinytex ####
# Installing latex packages
tinytex::tlmgr_install("pdfpages")