# NOT RUN {
# The default method.
minimalizeCsf("(f + a*D <-> C)*(C + A*B <-> D)*(c + a*E <-> F)")
minimalizeCsf("(f + a*D <-> C)*(C + A*B <-> D)*(c + a*E <-> F)",
verbose = TRUE) # Same result, but with some messages.
# The cna method.
dat1 <- selectCases("(C + A*B <-> D)*(c + a*E <-> F)")
ana1 <- cna(dat1, details = c("r"))
csf(ana1)
# The attribute "redundant" taking the value TRUE in ana1 shows that this csf contains
# at least one redundant element. Only the application of minimalizeCsf() identifies
# the redundant element.
minimalizeCsf(ana1)
# }
# NOT RUN {
# Real data entailing a large number of csf with many redundancies.
tt.js <- fstt(d.jobsecurity)
cna.js <- cna(tt.js, con = .8, cov = .8)
minim100 <- minimalizeCsf(cna.js, n = 100) # may take a couple of seconds...
minim100 # By default the first 5 solutions are displayed.
# }
# NOT RUN {
# With mv data.
tt.pban <- mvtt(d.pban)
cna.pban <- cna(tt.pban, con = .75, cov = .75)
csf.pban <- csf(cna.pban, 100)
sol.pban <- csf.pban$condition
minim.pban <- minimalizeCsf(sol.pban, tt.pban)
as.character(minim.pban$condition)
# Alternatively, a more direct replication of the above using the cna method.
minim.pban <- minimalizeCsf(cna.pban, n = 100)
print(minim.pban, 1:50) # print the first 50 redundancy-free csf
# }
Run the code above in your browser using DataLab