The function condTbl returns a table of class condTbl , which is a data.frame summarizing selected features of specified conditions (boolean, atomic, complex), e.g. scores on evaluation measures such as consistency and coverage. In contrast to a condList, a condTbl only shows summary measures and does not provide any information at the level of individual cases in the data.
The objects output by the functions msc, asf, and csf are such tables, as well as those returned by detailMeasures.
as.condTbl reshapes a condList as output by condition and condList to a condTbl.
condTbl(x, ...) executes condList(x, ...) and then turns its output into a condTbl by applying as.condTbl.
as.condTbl(x,...)condTbl(x,...)## S3 method for class 'condTbl'print(x, n =20, digits =3, quote =FALSE, row.names =TRUE, printMeasures =TRUE,...)## S3 method for class 'condTbl'as.data.frame(x,...)
Arguments
x: In as.condTbl, x is a list of evaluated conditions, i.e. an object of class , as returned by condition. In condTbl(x, ...), x and ... are the same as in condList(x, ...) or condition(x, ...).
In the dedicated methods of print and as.data.frame, x is a condTbl.
n: Maximal number of rows of the condTbl to be printed.
digits: Number of digits to print in evaluation measures and solution attributes (cf. detailMeasures).
quote, row.names: As in print.data.frame.
printMeasures: Logical; if TRUE, the output indicates which measures for sufficiency and necessity evaluation were used (provided the evaluated conditions are not boolean).
...: All arguments in condTbl(x, ...) are passed on to condList.
Details
The function as.condTbl takes an object of class condList returned by the condition function as input and reshapes it in such a way as to make it identical to the output returned by msc, asf, and csf.
The function condTbl is identical with as.condTbl(condition(...)) and as.condTbl(condList(...)), respectively. It thus takes any set of arguments that are valid in condition and condList and transforms the result into an object of class condTbl .
The argument digits applies to the print method. It determines how many digits of the evaluation measures and solution attributes (e.g. standard consistency and coverage, exhaustiveness, faithfulness, or coherence) are printed. The default value is 3.
Returns
The functions as.condTbl and condTbl return an object of class condTbl , a concise summary table featuring a set of conditions (boolean, atomic, complex), their outcomes (if the condition is an atomic or complex solution formula), and their scores on given summary measures (e.g. consistency and coverage). Technically, an object of class ‘condTbl’ is a data.frame with an additional class attribute "condTbl". It prints slightly differently by default than a data.frame with respect to column alignment and number of digits.
The section Value in cna-solutions has an enumeration of the columns that are most commonly present in a condTbl.
# Candidate asf for the d.jobsecurity data.x <-"S*R + C*l + L*R + L*P <-> JSR"# Create summary tables.condTbl(x, d.jobsecurity)# Using non-standard evaluation measures.condTbl(x, d.jobsecurity, measures = c("PAcon","PACcov"))# Candidate csf for the d.jobsecurity data.x <-"(C*R + C*V + L*R <-> P)*(P + S*R <-> JSR)"# Create summary tables.condTbl(x, d.jobsecurity)# Non-standard evaluation measures.condTbl(x, d.jobsecurity, measures = c("Ccon","Ccov"))# Boolean conditions.cond <- c("-(P + S*R)","C*R + !(C*V + L*R)","-L+(S*P)")condTbl(cond, d.jobsecurity)# only frequencies are returned# Do not print measures.condTbl(x, d.jobsecurity)|> print(printMeasures =FALSE)# Print more digits.condTbl(x, d.jobsecurity)|> print(digits =10)# Print more measures.detailMeasures(x, d.jobsecurity, what = c("Ccon","Ccov","PAcon","PACcov"))# Analyzing d.jobsecurity with standard evaluation measures.ana1 <- cna(d.jobsecurity, con =.8, cov =.8, outcome ="JSR")# Reshape the output of the condition function in such a way as to make it identical to the# output returned by msc, asf, and csf.head(as.condTbl(condition(msc(ana1), d.jobsecurity)),3)head(as.condTbl(condition(asf(ana1), d.jobsecurity)),3)head(as.condTbl(condition(csf(ana1), d.jobsecurity)),3)head(condTbl(csf(ana1), d.jobsecurity),3)# Same as preceding line