alishinski / lavaanPlot

R package for plotting lavaan path models with DiagrammeR
http://alexlishinski.com/lavaanPlot/
38 stars 4 forks source link

Can I specify the number of decimal places? #41

Closed waurimal1 closed 1 year ago

waurimal1 commented 2 years ago

Can I specify the number of decimal places?

jorgesinval commented 2 years ago

Yes:

library(lavaan)
model <- 'mpg ~ cyl + disp + hp
          qsec ~ disp + hp + wt'
fit <- sem(model, data = mtcars)
library(lavaanPlot)
lavaanPlot(model = fit, node_options = list(shape = "box", fontname = "Helvetica"),
           edge_options = list(color = "grey"), coefs = T, digits=4)