names.dagitty: Names of Variables in Graph

Description Usage Arguments Examples

View source: R/dagitty.r

Description

Extracts the variable names from an input graph. Useful for iterating over all variables.

Usage

1
2
## S3 method for class 'dagitty'
names(x)

Arguments

x

the input graph, of any type.

Examples

1
2
3
4
5
6
7
8
## A "DAG" with Romanian and Swedish variable names. These can be
## input using quotes to overcome the limitations on unquoted identifiers.
g <- dagitty( 'digraph {
  "cora<c3><a7><c3><a3>o" [pos="0.297,0.502"]
  "hj<c3><a4>rta" [pos="0.482,0.387"]
  "cora<c3><a7><c3><a3>o" -> "hj<c3><a4>rta"
}' )
names( g )

dagitty documentation built on May 31, 2017, 4:14 a.m.

Search within the dagitty package
Search all R packages, documentation and source code