plot.cna {causalHyperGraph}R Documentation

Create hypergraphs from solution objects of cna() and related functions

Description

These plot() methods draw causal hypergraphs from the solution formulas included in the objects of the following classes from package cna:

Usage

## S3 method for class 'condTbl'
plot(x, outcome = NULL, n = 10, ask = nrow(x) > 1, ...)

## S3 method for class 'cna'
plot(x, what = c("csf", "asf", "msc"), ...)

## S3 method for class 'condList'
plot(x, ...)

Arguments

x

An object of an appropriate class.

outcome

Character vector of factor names. Only solutions with one of these factors as outcome will be plotted. If NULL (default), all solutions are plotted.

n

Positive integer; specifies the maximal number of graphs to render.

ask

Logical; if TRUE, the user is asked to hit <Return> before a new graph is drawn.

...

Additional arguments in plot.condTbl() are passed to causalHyperGraph(), in particular show_formula. Additional arguments in plot.cna() and plot.condition() are passed to plot.condTbl(), e.g. n, outcome, ask.

what

One of "csf" (default), "asf", "msc", determining which type of solution to extract from the “cna” object.

Value

These plot() methods return an object of class “causalHyperGraph”.

Examples

library(cna)

ana <- cna(d.educate)
pl <- plot(asf(ana))
pl

plot(csf(ana))
plot(csf(ana), ask = FALSE)

plot(ana)
plot(ana, show_formula = TRUE)
plot(ana, what = "msc", n = 5)

plot(msc(ana), outcome = "E")
plot(ana, what = "msc", outcome = "E")  # same as previous


[Package causalHyperGraph version 0.1.0 Index]