genMixFormula | R Documentation |
Generates a mixture formula from a vector of variable names and an optional vector of probabilities.
genMixFormula(vars, probs = NULL, varLength = NULL)
vars |
Character vector/list of variable names. |
probs |
Numeric vector/list of probabilities. Has to be same length as vars or NULL. Probabilities will be normalized if the sum to > 1. |
varLength |
If |
The mixture formula as a string.
genMixFormula(c("a", "..b[..i]", "c"))
genMixFormula(c("a", "..b", "c"), c(.2, .5, .3))
# Shorthand to use external vectors/lists
genMixFormula("..arr", varLength = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.