Learn R Programming

edstan (version 1.1.0)

edstan_model_code: Read and print the code for an edstan model

Description

This function reads a Stan file from the `inst/extdata/` directory of the package, returning its contents invisibly while optionally printing them.

Usage

edstan_model_code(filename, print = TRUE)

Value

Invisibly returns a character vector of the stan file contents.

Arguments

filename

The name of the stan file.

print

Whether to print the stan file contents. Default is `TRUE`.

Examples

Run this code
# View the Stan code for the Rasch model
edstan_model_code("rasch_latent_reg.stan")

Run the code above in your browser using DataLab