-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.RBuild.Rmd
146 lines (120 loc) · 3.2 KB
/
.RBuild.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
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
This documents in a draft for keeping track of instruction which
were necessary to shape, build, test, document, check the package.
<https://bookdown.org/rdpeng/RProgDA/data-within-a-package.html>
# Create the package structure
```{r}
# TODO https://rmflight.github.io/posts/2014/07/vignetteAnalysis.html
options(
usethis.description = list(
`Authors@R` = 'person(
given = "François",
family = "Collin",
email = "[email protected]",
role = c("aut", "cre", "cph"),
comment = c(
ORCID = "0000-0003-0524-5755"
)
)',
URL = "https://FCACollin.github.io/Latarnia",
License = "CC BY-NC-ND 4.0",
Language = "en",
LazyData = "true",
Version = numeric_version("0.1.0-1"),
Title = "ClinAD: Standard Management of Clinical Data",
Description = paste(
"A S4-base class for handling clinical data in a standardise way."
)
)
)
devtools::create(".")
devtools::test()
usethis::use_git()
usethis::use_pkgdown()
usethis::use_lifecycle()
```
# Append DESCRIPION file
```{r}
usethis::use_package("testthat", type = "Suggests")
usethis::use_package("lintr", type = "Suggests")
usethis::use_package("methods")
usethis::use_package("Rdpack")
# usethis::use_package("knitr", type = "Suggests")
# usethis::use_package("rmarkdown", type = "Suggests")
# usethis::use_package("lme4", type = "Suggests")
# usethis::use_package("emmeans", type = "Suggests")
# usethis::use_package("Hmisc")
# usethis::use_package("corrplot")
# # usethis::use_package("viridis")
# usethis::use_package("car")
# # usethis::use_package("multcompView")
# usethis::use_package("multcomp")
# usethis::use_package("tidyr")
# usethis::use_package("FactoMineR")
# usethis::use_package("kableExtra")
# usethis::use_package("reshape2")
# usethis::use_package("missMDA")
# usethis::use_package("ggplot2")
# usethis::use_package("styler")
# # usethis::use_package("ggthemr", type = "Suggests")
# # usethis::use_package("shiny")
# # usethis::use_package("shinydashboard")
# usethis::use_package("dplyr", type = "Suggests")
# usethis::use_package("ggplot2", type = "Suggests")
# usethis::use_vignette("demographics")
## <https://community.rstudio.com/t/devtools-check-error-with-vignette-but-vignette-can-be-knitted-without-problem/55962/2>
```
```{r}
usethis::use_data_raw(name = "sdtm")
source("data-raw/sdtm.R")
```
# Document
```{r}
devtools::document()
rmarkdown::render("README.Rmd")
pkgdown::build_site()
```
# Testing
```{r}
rm(list = ls())
devtools::document()
devtools::test()
devtools::check()
pkgdown::build_site()
```
```{r}
devtools::load_all()
```
Usual checks before commit.
```{r}
devtools::test()
devtools::check()
pkgdown::build_site()
devtools::build_vignettes()
devtools::install(build_vignettes = FALSE, upgrade = "never")
devtools::install(build_vignettes = TRUE, upgrade = "never")
devtools::build()
```
```{r}
library(ClinAD)
# usethis::use_vignette("dm")
vignette("dm", package = "RPack.Diabete.microRNA")
```
```{r}
# Test Rdpack
install.packages("Rdpack")
# Applied:
# https://geobosh.github.io/Rdpack/
vignette("Inserting_bibtex_references", package = "Rdpack")
```
```{r}
devtools::build(binary = TRUE)
```
```{r}
library(RPack.Diabete.microRNA)
sdtm
adsl
adlb
advs
SDTM
labelling
```