to_stan_factor: Convert a factor variable into integers

Description Usage Arguments Examples

Description

This function converts a factor variable into an integer vector, which is useful for coding factors in the Stan programming language. Note that addNA() is the default, so if NAs exist in the factor, they will be included in the resulting vector as their own integer value.

Usage

1

Arguments

factor

A factor.

Examples

1
to_stan_factor(my.factor)

eveskew/reskew documentation built on May 16, 2019, 7:10 p.m.