| bifactory_template | R Documentation |
Opens the shipped analysis template in your editor, or copies it to a
destination of your choice. The template walks through the full bifactory
pipeline (CFA / ESEM / B-ESEM comparison, reliability, ESEM-within-CFA,
factor scores, and optional multi-group invariance) using
psych::bfi as the demo dataset.
bifactory_template(to = NULL, overwrite = FALSE)
to |
Optional file path. If supplied, the template is copied there
(with overwrite protection). If |
overwrite |
Logical. Overwrite an existing file at |
Invisibly returns the path to the template (or the destination
when to is supplied).
# Find the template path
system.file("templates", "template.R", package = "bifactory")
# Copy the template to a file (here a temporary one)
dest <- file.path(tempdir(), "my_analysis.R")
bifactory_template(to = dest, overwrite = TRUE)
## Not run:
# Open the template directly in your editor (interactive session only)
bifactory_template()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.