1
|
|
|
2
|
|
#' @title datable option for data(DT package)
|
3
|
|
#' @description DT::datatable option for data
|
4
|
|
#' @param fname File name to download
|
5
|
|
#' @return datatable option object
|
6
|
|
#' @details DETAILS
|
7
|
|
#' @examples
|
8
|
|
#' opt.data("mtcars")
|
9
|
|
#' @rdname opt.data
|
10
|
|
#' @export
|
11
|
|
|
12
|
|
opt.data = function(fname){
|
13
|
1
|
return(
|
14
|
1
|
list(dom = '<lf<rt>Bip>', lengthMenu = list(c(10, 25, -1), c('10', '25', 'All')), pageLength = 10,
|
15
|
1
|
buttons = list('copy',
|
16
|
1
|
'print',
|
17
|
1
|
list(extend = 'collection',
|
18
|
1
|
buttons = list(list(extend = 'csv', filename= fname),
|
19
|
1
|
list(extend = 'excel', filename= fname),
|
20
|
1
|
list(extend = 'pdf', filename= fname)
|
21
|
|
),
|
22
|
1
|
text = 'Download')
|
23
|
|
)
|
24
|
|
)
|
25
|
|
)
|
26
|
|
}
|
27
|
|
|
28
|
|
|
29
|
|
#' @title datable option for table 1(DT package)
|
30
|
|
#' @description DT::datatable option for table 1
|
31
|
|
#' @param fname File name to download
|
32
|
|
#' @return datatable option object
|
33
|
|
#' @details DETAILS
|
34
|
|
#' @examples
|
35
|
|
#' options = opt.tb1("mtcars")
|
36
|
|
#' @rdname opt.tb1
|
37
|
|
#' @export
|
38
|
|
|
39
|
|
opt.tb1 = function(fname){
|
40
|
1
|
return(
|
41
|
1
|
list(dom = '<lf<rt>Bip>', lengthMenu = list(c(10, 25, -1), c('10', '25', 'All')), pageLength = 25, ordering = F,
|
42
|
1
|
buttons = list('copy',
|
43
|
1
|
'print',
|
44
|
1
|
list(extend = 'collection',
|
45
|
1
|
buttons = list(list(extend = 'csv', filename= fname),
|
46
|
1
|
list(extend = 'excel', filename= fname),
|
47
|
1
|
list(extend = 'pdf', filename= fname)
|
48
|
|
),
|
49
|
1
|
text = 'Download')
|
50
|
|
)
|
51
|
|
)
|
52
|
|
)
|
53
|
|
}
|
54
|
|
|
55
|
|
|
56
|
|
|
57
|
|
#' @title datable option for regression table(DT package)
|
58
|
|
#' @description DT::datatable option for glm, gee(geepack package), lmer/glmer(lme4 package)
|
59
|
|
#' @param fname File name to download
|
60
|
|
#' @return datatable option object
|
61
|
|
#' @details DETAILS
|
62
|
|
#' @examples
|
63
|
|
#' options = opt.tbreg("mtcars")
|
64
|
|
#' @rdname opt.tbreg
|
65
|
|
#' @export
|
66
|
|
|
67
|
|
opt.tbreg = function(fname){
|
68
|
1
|
return(
|
69
|
1
|
list(dom = '<lf<rt>Bip>', lengthMenu = list(c(10, 25, -1), c('10', '25', 'All')), pageLength = -1, ordering=F,
|
70
|
1
|
buttons = list('copy',
|
71
|
1
|
'print',
|
72
|
1
|
list(extend = 'collection',
|
73
|
1
|
buttons = list(list(extend = 'csv', filename= fname),
|
74
|
1
|
list(extend = 'excel', filename= fname),
|
75
|
1
|
list(extend = 'pdf', filename= fname)
|
76
|
|
),
|
77
|
1
|
text = 'Download')
|
78
|
|
)
|
79
|
|
)
|
80
|
|
)
|
81
|
|
}
|
82
|
|
|
83
|
|
#' @title datable option for ROC result(DT package)
|
84
|
|
#' @description DT::datatable option for ROC result
|
85
|
|
#' @param fname File name to download
|
86
|
|
#' @return datatable option object
|
87
|
|
#' @details DETAILS
|
88
|
|
#' @examples
|
89
|
|
#' options = opt.roc("mtcars")
|
90
|
|
#' @rdname opt.roc
|
91
|
|
#' @export
|
92
|
|
|
93
|
|
opt.roc = function(fname){
|
94
|
1
|
return(
|
95
|
1
|
list(dom = '<<rt>Bip>', ordering=F,
|
96
|
1
|
buttons = list('copy',
|
97
|
1
|
'print',
|
98
|
1
|
list(extend = 'collection',
|
99
|
1
|
buttons = list(list(extend = 'csv', filename= fname),
|
100
|
1
|
list(extend = 'excel', filename= fname),
|
101
|
1
|
list(extend = 'pdf', filename= fname)
|
102
|
|
),
|
103
|
1
|
text = 'Download')
|
104
|
|
)
|
105
|
|
)
|
106
|
|
)
|
107
|
|
}
|
108
|
|
|
109
|
|
|
110
|
|
|
111
|
|
#' @title datable option for simple download(DT package)
|
112
|
|
#' @description Simple download DT::datatable option - No filter, No page
|
113
|
|
#' @param fname File name to download
|
114
|
|
#' @return datatable option object
|
115
|
|
#' @details DETAILS
|
116
|
|
#' @examples
|
117
|
|
#' options = opt.simpledown("mtcars")
|
118
|
|
#' @rdname opt.simpledown
|
119
|
|
#' @export
|
120
|
|
|
121
|
|
opt.simpledown = function(fname){
|
122
|
1
|
return(
|
123
|
1
|
list(dom = '<<rt>B>', ordering=F, pageLength = -1,
|
124
|
1
|
buttons = list('copy',
|
125
|
1
|
'print',
|
126
|
1
|
list(extend = 'collection',
|
127
|
1
|
buttons = list(list(extend = 'csv', filename= fname),
|
128
|
1
|
list(extend = 'excel', filename= fname),
|
129
|
1
|
list(extend = 'pdf', filename= fname)
|
130
|
|
),
|
131
|
1
|
text = 'Download')
|
132
|
|
)
|
133
|
|
)
|
134
|
|
)
|
135
|
|
}
|