condList-methods | R Documentation |
The output of the condition
function is a nested list of class “condList” that contains one or several data frames. The utilities in condList-methods
are suited for rendering or reshaping these objects in different ways.
## S3 method for class 'condList'
summary(object, ...)
## S3 method for class 'condList'
as.data.frame(x, row.names = attr(x, "cases"), optional = TRUE, nobs = TRUE, ...)
group.by.outcome(object, cases = TRUE)
object , x |
An object of class “condList”, the output of the |
... |
Not used. |
row.names , optional |
As in |
nobs |
Logical; if |
cases |
Logical; if |
The summary
method for class “condList” prints the output of condition
in a condensed manner. It is identical to print
ing with print.table = FALSE
, see print.condList
.
The output of condition
is a nested list of class “condList” that contains one or several data frames. The method as.data.frame
is a variant of the base method as.data.frame
. It offers a convenient way of combining the columns of the data frames in a condList
into one regular data frame.
Columns appearing in several tables (typically the modeled outcomes) are included only once in the resulting data frame. The output of as.data.frame
has syntactically invalid column names by default, including operators such as "->"
or "+"
.
Setting optional = FALSE
converts the column names into syntactically valid names (using make.names
).
group.by.outcome
takes a condlist
as input and combines the entries in that nested list into a data frame with a larger number of columns, combining all columns concerning the same outcome into the same data frame. The additional attributes (consistency etc.) are thereby removed.
condition
ana1 <- cna(d.educate)
(csfList <- condition(csf(ana1)$condition, d.educate))
as.data.frame(csfList)
as.data.frame(csfList[1]) # Include the first condition only
as.data.frame(csfList, row.names = NULL)
as.data.frame(csfList, optional = FALSE)
as.data.frame(csfList, nobs = FALSE)
(asfList <- condition(asf(ana1)$condition, d.educate))
as.data.frame(asfList)
group.by.outcome(asfList)
summary(asfList)
(mscList <- condition(msc(ana1)$condition, d.educate))
as.data.frame(mscList)
group.by.outcome(mscList)
summary(mscList)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.