tidySEM icon indicating copy to clipboard operation
tidySEM copied to clipboard

Feature request: more location of connection for nodes

Open perlatex opened this issue 1 year ago • 0 comments
trafficstars

library(tidyverse)
library(lavaan)
library(tidySEM)

HS.model <- ' 
   ind60 =~ x1 + x2 + x3 
   dem60 =~ y1 + y2 + y3 + y4 
   dem65 =~ y5 + y6 + y7 + y8 
'

fit <- cfa(HS.model, data = PoliticalDemocracy)


g <- fit %>% prepare_graph()

edges(g) %>% 
  select(from, to, arrow, label, connect_from, connect_to, label_results) %>% 
  filter(str_detect(label_results, ".WITH."))
#>    from    to arrow   label   connect_from   connect_to    label_results
#> 1 ind60 dem60  none  0.66**         left      right         ind60.WITH.dem60
#> 2 ind60 dem65  none 0.77***       bottom        top        ind60.WITH.dem65
#> 3 dem60 dem65  none 4.49***        right       left        dem60.WITH.dem65

there are only four positions available for connecting oval nodes c("bottom", "top", "left", "right"). Could you provide more options, such as "topright" and "bottomleft"? Thanks!

perlatex avatar Jun 21 '24 13:06 perlatex