count.mod.vars | R Documentation |
This function takes a model string and counts the number of predictor variables.
count.mod.vars(model)
model |
model specified as a string in the form "y ~ x1 + x2 ..." |
an integer specifying the count of predictor variables
count <- count.mod.vars(model=formula('y ~ x1 + x2'))
if(count == 2) { print('sane'); }else{ print('insane')}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.