Learn R Programming

lavaanPlot (version 0.8.1)

Path Diagrams for 'Lavaan' Models via 'DiagrammeR'

Description

Plots path diagrams from models in 'lavaan' using the plotting functionality from the 'DiagrammeR' package. 'DiagrammeR' provides nice path diagrams via 'Graphviz', and these functions make it easy to generate these diagrams from a 'lavaan' path model without having to write the DOT language graph specification.

Copy Link

Version

Install

install.packages('lavaanPlot')

Monthly Downloads

2,151

Version

0.8.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Alex Lishinski

Last Published

January 29th, 2024

Functions in lavaanPlot (0.8.1)

buildPaths

Extracts the paths from the lavaan model.
embed_plot_pdf

Embeds a plot into an rmarkdown pdf
extract_coefs

Creates a data frame of the parameter table from lavaan model
buildCall

Builds the Diagrammer function call.
buildLabels

Adds variable labels to the Diagrammer plot function call.
formatting

Enables conditional formatting for different parts of the model
create_nodes

Creates node data frame and adds formatting
convert_graph

Uses the diagrammeR functions to turn the ndf and edf into dot
create_edges

Creates edge data frame and adds formatting
lavaanPlot2

Plots lavaan path model with DiagrammeR
create_grviz

Creates the grViz dot language code for plotting
getNodes

Extracts the paths from the lavaan model.
save_png

Saves a plot as a png
lavaanPlot

Plots lavaan path model with DiagrammeR
sig_stars

Generates standard significance stars