edit_graph: Edit graph elements

Description Usage Arguments Value Examples

View source: R/plot-plot_sem.R

Description

Evaluate an R expression within the environment of the elements of a sem_graph object, and return the modified sem_graph.

Usage

1
2
3
4
5
edit_graph(x, expr, element = c("edges", "nodes"), ...)

edit_nodes(x, expr, ...)

edit_edges(x, expr, ...)

Arguments

x

An object of class sem_graph.

expr

expression to evaluate.

element

Character. The element of the sem_graph to edit, defaults to c("edges", "nodes").

...

Arguments passed on to within.

Value

An object of class sem_graph.

Examples

1
2
3
p <- prepare_graph(layout = get_layout("x", rows = 1))
p <- edit_graph(p, {colour = "blue"}, element = "nodes")
plot(p)

Example output

Registered S3 methods overwritten by 'tidySEM':
  method              from           
  print.mplus.model   MplusAutomation
  print.mplusObject   MplusAutomation
  summary.mplus.model MplusAutomation

tidySEM documentation built on Nov. 17, 2021, 1:07 a.m.