split.desc.Rd
Split a table of statistics in two.
# S3 method for desc split(x, f, drop, ..., variable, at)
x | A desc object |
---|---|
f | see split documentation |
drop | see split documentation |
... | Other parameters |
variable | Character. Indicates the variable to use for the split |
at | Integer. Indicates the maximum number of levels to include in the first splitted table |
Used for splitting an output in two. It can be used for example when the table takes too much space in a page of a Word document (see the example below).
data(datafake) tab1=report.quanti(data=datafake,y="y_numeric", x1="GROUP",x2="TIMEPOINT",at.row="TIMEPOINT",subjid="SUBJID") s=split(tab1,variable="TIMEPOINT",at=3) tab1.1=s$x1 tab1.2=s$x2 tab1.1#> #> ############################################ #> Quantitative descriptive statistics of: y_numeric #> ############################################ #> #> TIMEPOINT Statistics A (N=30) B (N=21) C (N=17) #> 1 D0 N 30 20 16 #> 2 D0 Mean (SD) -0.93(0.86) -0.67(1.09) -1.19(0.92) #> 3 D0 Median -0.82 -0.69 -1.26 #> 4 D0 [Q1;Q3] [-1.59;-0.16] [-1.39;-0.06] [-1.62;-0.83] #> 5 D0 [Min;Max] [-2.34;0.36] [-2.44;2.10] [-2.99;0.66] #> 6 D0 Missing 1 1 0 #> 7 #> 8 D1 N 30 20 16 #> 9 D1 Mean (SD) 1.83(1.04) 4.17(1.28) 4.98(0.69) #> 10 D1 Median 1.78 4.19 5.08 #> 11 D1 [Q1;Q3] [ 0.94; 2.54] [ 3.23; 4.92] [ 4.58; 5.46] #> 12 D1 [Min;Max] [ 0.11;3.88] [ 1.48;6.19] [ 3.80;6.23] #> 13 D1 Missing 1 0 0 #> 14 #> 15 D2 N 30 20 16 #> 16 D2 Mean (SD) 1.97(1.17) 4.04(0.89) 4.90(1.36) #> 17 D2 Median 1.66 4.19 5.06 #> 18 D2 [Q1;Q3] [ 1.23; 2.86] [ 3.62; 4.36] [ 4.34; 5.20] #> 19 D2 [Min;Max] [-0.18;4.36] [ 2.03;5.63] [ 2.39;7.96] #> 20 D2 Missing 1 1 0 #> #> ############################################ #>tab1.2#> #> ############################################ #> Quantitative descriptive statistics of: y_numeric #> ############################################ #> #> TIMEPOINT Statistics A (N=30) B (N=21) C (N=17) #> 1 D3 N 30 20 16 #> 2 D3 Mean (SD) 1.78(1.17) 3.81(0.94) 5.07(1.12) #> 3 D3 Median 1.78 3.63 5.22 #> 4 D3 [Q1;Q3] [ 0.93; 2.42] [ 3.13; 4.44] [ 4.11; 5.66] #> 5 D3 [Min;Max] [-0.16;3.90] [ 2.46;6.01] [ 3.16;7.37] #> 6 D3 Missing 0 1 1 #> 7 #> 8 D4 N 30 20 16 #> 9 D4 Mean (SD) 1.83(0.85) 3.80(0.95) 5.17(1.03) #> 10 D4 Median 1.67 3.83 4.88 #> 11 D4 [Q1;Q3] [ 1.26; 2.32] [ 3.12; 4.42] [ 4.69; 5.50] #> 12 D4 [Min;Max] [ 0.38;3.97] [ 2.31;5.41] [ 3.24;6.96] #> 13 D4 Missing 1 1 1 #> 14 #> 15 D5 N 30 20 16 #> 16 D5 Mean (SD) 2.27(1.20) 3.64(1.19) 4.43(0.98) #> 17 D5 Median 2.50 3.86 4.57 #> 18 D5 [Q1;Q3] [ 1.77; 3.21] [ 2.59; 4.60] [ 3.44; 4.97] #> 19 D5 [Min;Max] [-1.19;4.31] [ 0.91;5.12] [ 2.95;6.54] #> 20 D5 Missing 0 0 0 #> #> ############################################ #>