-
Notifications
You must be signed in to change notification settings - Fork 1
/
_devhistory.R
151 lines (122 loc) · 4.08 KB
/
_devhistory.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
pkg <- "elbow"
usethis::create_package(pkg)
usethis::use_git()
usethis::use_git_ignore(".DS_Store")
system("git add -A")
system("git commit -m ':tada: Init Repository'")
usethis::edit_file("DESCRIPTION")
## ● Edit 'DESCRIPTION'
system("git add -A")
system("git commit -m ':bulb: Edit Package Metadata'")
usethis::use_gpl3_license(name = "Nicolas Casajus")
system("git add -A")
system("git commit -m ':page_facing_up: Add Package License'")
usethis::use_build_ignore("_devhistory.R")
system("git add -A")
system("git commit -m ':see_no_evil: Ignore {_devhistory}'")
usethis::use_roxygen_md()
system("git add -A")
system("git commit -m ':wrench: Roxygen2 Setup'")
# usethis::use_package_doc()
# devtools::document()
# system("git add -A")
# system("git commit -m 'Edit Package Homepage'")
usethis::use_r("elbow")
## ● Edit 'R/elbow.R' (R code)
system("git add -A")
system("git commit -m ':sparkles: Implement Elbow Method'")
usethis::edit_file(file.path("R", "elbow.R"))
## ● Edit 'R/elbow.R' (Code doc)
devtools::document()
system("git add -A")
system("git commit -m ':bulb: Edit Function Documentation'")
usethis::use_package(package = "stats")
usethis::use_package(package = "graphics")
system("git add -A")
system("git commit -m ':heavy_plus_sign: Add {stats} and {graphics} Dependencies'")
x <- 0:30
y1 <- c(0, 0.5)
y2 <- c(1, 0.5)
for (i in 2:(length(x) - 1)) {
y1 <- c(y1, y1[i] + (y1[i] - y1[i - 1]) / 2)
y2 <- c(y2, y2[i] - (y2[i - 1] - y2[i]) / 2)
}
profiles <- data.frame(
x = x,
concave_down_pos_slo = y1,
concave_down_neg_slo = y1[length(y1):1],
concave_up_pos_slo = y2[length(y2):1],
concave_up_neg_slo = y2
)
usethis::use_data(profiles, internal = FALSE)
system("git add -A")
system("git commit -m ':sparkles: Add {profiles} Dataset'")
usethis::use_r("profiles")
## ● Edit 'R/profiles.R' (Dataset doc)
devtools::document()
system("git add -A")
system("git commit -m ':bulb: Edit Dataset Documentation'")
usethis::edit_file(file.path("R", "elbow.R"))
## ● Edit 'R/profiles.R' (Example section)
devtools::document()
system("git add -A")
system("git commit -m ':bulb: Add Example Section'")
devtools::check()
usethis::use_vignette("introduction")
## ● Edit 'vignettes/introduction.Rmd'
system("git add -A")
system("git commit -m ':books: Edit Package Vignette'")
usethis::use_readme_rmd()
## ● Edit 'README.Rmd'
rmarkdown::render("README.Rmd")
usethis::use_git_ignore("README.html")
system("git add -A")
system("git commit -m ':pencil: Edit README'")
usethis::use_code_of_conduct()
## ● Edit 'CODE_OF_CONDUCT.md'
## ● Edit 'README.Rmd'
rmarkdown::render("README.Rmd")
system("git add -A")
system("git commit -m ':page_facing_up: Add Code of Conduct'")
usethis::use_github(protocol = "https")
usethis::use_travis()
## ● Edit '.travis.yml'
rmarkdown::render("README.Rmd")
system("git add -A")
system("git commit -m ':construction_worker: Travis CI Setup'")
system("git push")
usethis::use_appveyor()
## ● Edit 'appveyor.yml'
rmarkdown::render("README.Rmd")
system("git add -A")
system("git commit -m ':construction_worker: Appveyor Setup'")
system("git push")
usethis::use_pkgdown()
pkgdown::build_site()
system("git add -A")
system("git commit -m ':wrench: Pkgdown Setup'")
system("git push")
usethis::use_pkgdown_travis()
travis::use_travis_deploy()
## ● Edit '.travis.yml'
## NB. pkgdown::deploy_site_github(ssh_id = Sys.getenv("TRAVIS_DEPLOY_KEY", ""))
system("git add -A")
system("git commit -m ':rocket: Deploy Website (Travis CI)'")
system("git push")
## ● Remove 'inst/doc' from .gitignore
system("git add -A")
system("git commit -m ':see_no_evil: Track inst/doc'")
system("git push")
usethis::use_testthat()
usethis::use_test("elbow")
## ● Edit 'tests/testthat/test-elbow.R'
system("git add -A")
system("git commit -m ':white_check_mark: Tests {elbow} Function'")
system("git push")
usethis::use_coverage("codecov")
## ● Wait a few minutes after adding repository on https://codecov.io
rmarkdown::render("README.Rmd")
system("git add -A")
system("git commit -m ':construction_worker: Code Coverage Setup'")
system("git push")
# usethis::use_version(which = "major")