check_formula {LDATS} | R Documentation |
Check that a formula is proper
Description
Check that formula
is actually a
formula
and that the
response and predictor variables are all included in data
.
Usage
check_formula(data, formula)
Arguments
data |
|
formula |
|
Value
An error message is thrown if formula
is not proper,
else NULL
.
Examples
data(rodents)
document_term_table <- rodents$document_term_table
document_covariate_table <- rodents$document_covariate_table
LDA_models <- LDA_set(document_term_table, topics = 2)[[1]]
data <- document_covariate_table
data$gamma <- LDA_models@gamma
check_formula(data, gamma ~ 1)
[Package LDATS version 0.3.0 Index]