Description Usage Arguments Details Value See Also Examples
regroup
regroup two descriptive tables (qualitative or quantitative) into one
1 2 3 4 |
x |
A desc object |
y |
A desc object |
... |
Other parameters |
rbind.label |
Character. The label for rbind column header |
Regroup a quantitative table and a qualitative table, is only possible if there is one and only one explicative variable.
So it works if and only if x1
argument in x
and y
objects are not NULL, are the same
and if x2
argument is NULL in both x
and y
objects.
The function takes the y.label argument of object x
and y
respectively
as label for the levels of the new column created under the name of rbind.label (see example below)
It's also possible to regroup two quantitative tables, in this case it's possible if there is one or two explicative variables.
For now it's not possible to regroup two qualitative tables.
A desc object corresponding to a table of statistics.
report.quali
report.quanti
report.doc
desc
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 | data(datafake)
# Example with a qualitative and a quantitative tables
#The argument y.label is stored in the desc object and
# only used after by the regroup function
tab1=report.quanti(data=datafake,y="y_numeric",
x1="GROUP",subjid="SUBJID",y.label="Y numeric")
tab2=report.quali(data=datafake,y="y_logistic",
x1="GROUP",subjid="SUBJID",y.label="Y logistic")
regroup(tab1,tab2,rbind.label="The label of your choice")
# Example with 2 quantitative tables
tab1=report.quanti(data=datafake,y="y_numeric",
x1="GROUP",subjid="SUBJID",y.label="Y numeric")
datafake$y_numeric2=rnorm(length(datafake$y_numeric))
tab2=report.quanti(data=datafake,y="y_numeric2",
x1="GROUP",subjid="SUBJID",y.label="Y Numeric 2")
regroup(tab1,tab2,rbind.label="The label of your choice")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.