-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck.R
114 lines (82 loc) · 1.93 KB
/
check.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
# Push to github and gitlab -----------
# git push -u gitlab master
# git push -u origin master
# git checkout -b progressbar
# git branch
# git push --set-upstream gitlab progressbar
# git push --set-upstream origin progressbar
# devtools --------
library(devtools)
load_all()
document()
check_man()
check()
build()
install(upgrade = "never")
test()
# build_readme()
# build_site()
# usethis ---------
library(usethis)
use_package_doc()
use_testthat()
use_logo("inst/logo.svg")
use_test("dcc")
use_test("combn_char")
# covr::package_coverage() ------------
rstudioapi::restartSession()
library(covr)
cov <- package_coverage()
cov
# as.data.frame(cov)
# report()
report(cov, file = "distrr-report.html")
# pkgdown ---------
library(pkgdown)
build_site()
# Trials ----------
# dcc6 step by step
.data <- invented_wages
.variables <- c("gender", "education")
.total <- "TOTAL"
order_type <- extract_unique4
.funs_list <- list(n = ~dplyr::n())
.all <- TRUE
d <- prepare_data(
.data = .data,
.variables = .variables,
.total = .total,
order_type = order_type
)
l <- d[["l"]]; data_new <- d[["data_new"]]; l_lev <- d[["l_lev"]]
joint_all <- joint_all_funs_(
data_new,
.variables = .variables,
.funs_list = .funs_list,
.total = .total, .all = .all
)
joint_all_final <- finish_cube(
joint_all = joint_all,
.variables = .variables,
l_lev = l_lev,
l = l
)
attributes(joint_all_final)[[".variables"]] <- .variables
tmp <- dcc6(.data, .variables, .funs_list, .total, order_type, .all)
tmp <- dcc6_fixed(
.data, .variables, .funs_list, .total, order_type, .all,
fixed_variable = "gender"
)
# dcc5 step by step
formals(dcc5)
dcc5(.data, .variables, jointfun_, .total)
dcc5(.data, .variables, jointfun_, .total, m = ~mean(wage))
dcc(.data, .variables, jointfun_)
dcc2(.data, .variables, jointfun_)
joint_all <- joint_all_(
data_new,
.variables = .variables,
.fun = jointfun_,
.total = .total,
.all = .all
)