Title: | Graphical User Interface with Integrated 'Diagrammer' for 'Lavaan' |
Version: | 0.2.5 |
Description: | Provides a graphical user interface with an integrated diagrammer for latent variables from the 'lavaan' package. It offers two core functions: first, lavaangui() launches a web application that allows users to specify models by drawing path diagrams, fitting them, assessing model fit, and more; second, plot_lavaan() creates interactive path diagrams from models specified in 'lavaan'. Karch (2024) <doi:10.31234/osf.io/f4ary> contains a tutorial. |
URL: | https://lavaangui.org/, https://github.com/karchjd/lavaangui |
BugReports: | https://github.com/karchjd/lavaangui/issues |
License: | GPL (≥ 3) |
Imports: | base64enc (≥ 0.1.3), future (≥ 1.33.0), haven (≥ 2.5.3), jsonlite (≥ 1.8.4), lavaan (≥ 0.6.15), promises (≥ 1.2.0.1), readr (≥ 2.1.4), readxl (≥ 1.4.3), shiny (≥ 1.7.4), methods (≥ 4.3.3), colorspace (≥ 2.1.0), igraph (≥ 2.0.3), tools (≥ 4.3.3), utils (≥ 4.3.3), DT (≥ 0.33), plyr (≥ 1.8.9), digest (≥ 0.6.35) |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Date: | 2025-07-15 |
Language: | en-US |
NeedsCompilation: | no |
Packaged: | 2025-07-15 08:08:10 UTC; karch |
Author: | Julian D. Karch |
Maintainer: | Julian D. Karch <j.d.karch@fsw.leidenuniv.nl> |
Repository: | CRAN |
Date/Publication: | 2025-07-15 08:20:02 UTC |
Start lavaangui Shiny Application
Description
The lavaangui
function launches the lavaangui Shiny application.
Usage
lavaangui(fit = NULL)
Arguments
fit |
A lavaan model, as returned by the |
Details
Currently, multiple-group models are not supported. However, you can create an
interactive plot of those models using plot_lavaan
Value
nothing
Examples
# Without importing lavaan model
lavaangui()
# Importing a lavaan model
library(lavaan)
model <- "
visual =~ x1 + loadingx2*x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
"
fit <- cfa(model, data = HolzingerSwineford1939)
lavaangui(fit)
Create Interactive Path Diagrams for Lavaan Models
Description
The plot_lavaan
function creates path diagrams for lavaan model.
The created paths diagrams are interactive.
That is, their appearance can be customized easily, for example, by dragging
around nodes representing variable with the mouse.
Usage
plot_lavaan(fit, where = "gadget")
Arguments
fit |
A lavaan model, as returned by the functions |
where |
A character string to specify where the path diagram should be shown. The default value "gadget" shows it directly in Rstudio. For "browser", it's shown in your default browser. For non-RStudio users, the parameter has no effect, and the path diagram is always shown in the browser. |
Value
nothing
Examples
library(lavaan)
model <- '
visual =~ x1 + loadingx2*x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
'
fit <- cfa(model, data = HolzingerSwineford1939)
plot_lavaan(fit)