-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
module-updates-jjstatsplot.R
108 lines (76 loc) · 2.24 KB
/
module-updates-jjstatsplot.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
# jjstatsplot ----
jmvtools::prepare(pkg = wd)
devtools::document(pkg = wd)
jmvtools::prepare(pkg = wd)
devtools::document(pkg = wd)
# devtools::check(pkg = wd)
# jmvtools::install(pkg = wd)
## update project for release
jjstatsplot_functions <- c(
"^jjstatsplot-data",
"^jjstatsplot-package",
"^jjhistostats",
"^jjbarstats",
"^jjpiestats",
"^jjdotplotstats",
"^jjcorrmat",
"^jjscatterstats",
"^jjbetweenstats",
"^jjwithinstats",
"^jjwithinstats2",
"^jjwithinstats3",
"^statsplot2"
)
readyfunctions <- paste0(jjstatsplot_functions, collapse = "|")
files_R <-
list.files(path = here::here("R"),
pattern = readyfunctions,
full.names = TRUE)
files_jamovi <-
list.files(
path = here::here("jamovi"),
pattern = paste0(readyfunctions, "|^00refs"),
full.names = TRUE
)
# files_data <-
# list.files(
# path = here::here("data"),
# full.names = TRUE
# )
# histopathologyGraphsPlots.omv
# histopathology.csv
# histopathology.omv
# histopathology.rda
modules_path <- here::here(fs::path_home(), "Documents", "GitHub")
file.copy(from = files_R,
to = paste0(modules_path, "/jjstatsplot", "/R"),
overwrite = TRUE)
file.copy(from = files_jamovi,
to = paste0(modules_path, "/jjstatsplot", "/R"),
overwrite = TRUE)
# file.copy(from = files_data,
# to = "~/ClinicoPath/data/",
# overwrite = TRUE)
# file.copy(from = files_data,
# to = "~/histopathRprojects/ClinicoPath/inst/extdata/",
# overwrite = TRUE)
wd <- paste0(modules_path, "/jjstatsplot")
jmvtools::prepare(pkg = wd)
devtools::document(pkg = wd)
jmvtools::prepare(pkg = wd)
devtools::document(pkg = wd)
jmvtools::install(pkg = wd)
tryCatch(
{
devtools::check(pkg = wd)
},
error = function(error_message) {
message("Below is the error message from R:")
message(error_message)
return(NA)
}
)
# gitUpdateCommitPush
CommitMessage <- paste("updated on ", Sys.time(), sep = "")
gitCommand <- paste("cd ", wd, " \n git add . \n git commit --message '", CommitMessage, "' \n git push origin master \n", sep = "")
system(command = gitCommand, intern = TRUE)