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

label

DAG labels


Description

Label or otherwise retrieve labels from objects of either class tidy_dagitty or dagitty

Usage

label(x) <- value

## S3 replacement method for class 'dagitty'
label(x) <- value

## S3 replacement method for class 'tidy_dagitty'
label(x) <- value

dag_label(.tdy_dag, labels = NULL)

label(.tdy_dag)

has_labels(.tdy_dag)

Arguments

x

an object of either class tidy_dagitty or dagitty

value

a character vector

.tdy_dag

an object of class tidy_dagitty

labels

a character vector

Value

label returns the label attribute of x

Examples

labelled_dag <- dagify(y ~ z, x ~ z) %>%
 tidy_dagitty() %>%
 dag_label(labels = c("x" = "exposure", "y" = "outcome", "z" = "confounder"))

 has_labels(labelled_dag)

ggdag

Analyze and Create Elegant Directed Acyclic Graphs

v0.2.3
MIT + file LICENSE
Authors
Malcolm Barrett [aut, cre] (<https://orcid.org/0000-0003-0299-5825>)
Initial release

We don't support your browser anymore

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