cjvanlissa / tidySEM

54 stars 7 forks source link

add `element` to all_funs? #26

Closed mattansb closed 3 years ago

mattansb commented 3 years ago

This would make edit_graph and all the other modifying functions pipe-able on the same pipe:

prepare_graph(fit) %>%
  edit_graph(element = "edges", {
    label = paste0(est_std, "\n", confint_std)
  }) %>%
  color_pos("green", element = "edges") %>%
  linetype_nonsig(2, element = "nodes") %>%
  # etc...
  plot()
cjvanlissa commented 3 years ago

No, this is not the direction I want to go in. Instead, try:

prepare_graph(fit) %>%
  edit_edges({ label = paste0(est_std, "\n", confint_std)}) %>%
  color_pos_edges("green") %>%
  linetype_nonsig_nodes(2) %>%
  # etc...
  plot()
cjvanlissa commented 3 years ago

BTW, these functions do have that argument already. But it's basically redundant.