knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of digavaan is to extract information as R data structures from a lavaan
object.
Install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("asqm/digavaan")
Warning: digavaan
will most likely never go to CRAN because it uses internal functions from lavaan
. This hinders the package as unstable. However, because most of the inner functions that are used in this package are the same used by lavaan::summary
, unless there's a breaking change (very unlikely with such a mature package) the same information should be stable.
Using the same example from lavaan
:
library(lavaan) library(digavaan) model <- " # latent variables ind60 =~ x1 + x2 + x3 dem60 =~ y1 + y2 + y3 + y4 dem65 =~ y5 + y6 + y7 + y8 # regressions dem60 ~ ind60 dem65 ~ ind60 + dem60 # residual covariances y1 ~~ y5 y2 ~~ y4 + y6 y3 ~~ y7 y4 ~~ y8 y6 ~~ y8" fit <- sem(model, data=PoliticalDemocracy) # Traditional print summary(fit) # Same information but as a data frames summary_lavaan(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.