condList-methods | R Documentation |
The output of the condition
(aka condList
) 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, n = 6, ...)
## 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 |
Object of class “condList” as output by the |
n |
Positive integer: the maximal number of conditions to be printed. |
... |
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
(but with a different default of argument n
), 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 (measures, info, etc.) are thereby removed.
condition
, condList
, as.data.frame
, make.names
# Analysis of d.irrigate data with standard evaluation measures.
ana1 <- cna(d.irrigate, ordering = "A, R, L < F, C < W", con = .9)
(ana1.csf <- condition(csf(ana1)$condition, d.irrigate))
# Convert condList to data frame.
as.data.frame(ana1.csf)
as.data.frame(ana1.csf[1]) # Include the first condition only
as.data.frame(ana1.csf, row.names = NULL)
as.data.frame(ana1.csf, optional = FALSE)
as.data.frame(ana1.csf, nobs = FALSE)
# Summary.
summary(ana1.csf)
# Analyze atomic solution formulas.
(ana1.asf <- condition(asf(ana1)$condition, d.irrigate))
as.data.frame(ana1.asf)
summary(ana1.asf)
# Group by outcome.
group.by.outcome(ana1.asf)
# Analyze minimally sufficient conditions.
(ana1.msc <- condition(msc(ana1)$condition, d.irrigate))
as.data.frame(ana1.msc)
group.by.outcome(ana1.msc)
summary(ana1.msc)
# Print more than 6 conditions.
summary(ana1.msc, n = 10)
# Analysis with different evaluation measures.
ana2 <- cna(d.irrigate, ordering = "A, R, L < F, C < W", con = .9, cov = .9,
measures = c("PAcon", "PACcov"))
(ana2.csf <- condition(csf(ana2)$condition, d.irrigate))
print(ana2.csf, add.data = d.irrigate, n=10)
as.data.frame(ana2.csf, nobs = FALSE, row.names = NULL)
summary(ana2.csf, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.