code_template: Template for the generated R code

Description Usage Details Value Examples

View source: R/code_template.r

Description

Default R code template used by semproducible when generating the code.

Usage

1

Details

The template is a string with R code that contain placeholders in the form of variables like %%NAME%%. The variables are replaced with actual content of the SEM model during code generation.

Placeholder variables:

Value

a character string with the R code template.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Create random data.
data <- data.frame(x = rnorm(100), y = rnorm(100))

# Modify code template.
template <- paste(code_template(), "\n# A comment placed at end of code")

# Generate R code with the template.
code <- semproducible(data, formula="y ~ x", template = template)

## End(Not run)

peterdalle/semproducible documentation built on Sept. 4, 2020, 8:02 a.m.