as_lavaan: Convert tidy_sem to 'lavaan' syntax

View source: R/syntax-as_syntax.R

as_lavaanR Documentation

Convert tidy_sem to 'lavaan' syntax

Description

Final stage in the 'tidySEM' workflow for syntax generation: Convert the tidy_sem object to lavaan syntax in tabular format (see model.syntax).

Usage

as_lavaan(x, ...)

Arguments

x

An object of class tidy_sem

...

Additional parameters to be passed to and from functions.

Value

Character vector.

Examples

mod <- list(syntax = structure(list(lhs = "x", op = "~", rhs = "y",
                                    free = TRUE, value = "", label = "",
                                    category = "", aspect = ""),
            class = "data.frame", row.names = c(NA, -1L)))
class(mod) <- "tidy_sem"
as_lavaan(mod)

tidySEM documentation built on Oct. 25, 2023, 1:06 a.m.