tests/testthat/test-get_nodes_multigroup_label.R

library(lavaan)
library(tidySEM)

HS.model <- '  F =~ x1 + x2 + x3'
fit <- cfa(HS.model,
           data = HolzingerSwineford1939,
           group = "school")

test_that("get_nodes correctly labels multigroup models", {
  expect_true(get_nodes(fit, label = "name")$label[1] == "F")
})

Try the tidySEM package in your browser

Any scripts or data that you put into this service are public.

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