Write a DAG node symbol.

Description

Writes the node symbols, 'X' and 'Y' for exposure and outcome, 'C' and 'U' (with consecutive subscripts) for known and unknown covariables. Since v1.1.2, alt.symb allows the use of custom node symbols. Unknownness is identified by either node name 'unknown' or covariable type '2' in the DAG object. Note that adjusted nodes are marked by bar and underline; this currently does not apply to those marked as unknown.

Usage

1
dag.letter(dag, letter, x, y, alt.symb = TRUE)

Arguments

dag

The DAG for which a node is to be written.

letter

The node that is of interest.

x

X position.

y

Y position.

alt.symb

Boolean indicating if custom symbols (dag$symbols) should be used if available.

Author(s)

Lutz P Breitling <lutz.breitling@gmail.com>

See Also

dag.draw, dag.legend, write.paths

Examples

1
2
3
4
5
6
7
dag2a<-dag.adjust(demo.dag2(), 3);
dag.draw(dag2a, paths=FALSE);
dag.letter(dag2a,  1,  0.2, 1);
dag.letter(dag2a,  2, 0.25, 1);
dag.letter(dag2a,  3,  0.3, 1);
dag.letter(dag2a,  4, 0.35, 1);
dag.letter(dag2a, 13,  0.4, 1);

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.