Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

names.dagitty

Names of Variables in Graph


Description

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

Usage

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

Arguments

x

the input graph, of any type.

Examples

## 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ção" [pos="0.297,0.502"]
  "hjärta" [pos="0.482,0.387"]
  "coração" -> "hjärta"
}' )
names( g )

dagitty

Graphical Analysis of Structural Causal Models

v0.3-1
GPL-2
Authors
Johannes Textor, Benito van der Zander, Ankur Ankan
Initial release
2021-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.