Description Usage Arguments Details Value Examples
This function is stolen directly from Rgadget::to.gadget.formulae. It takes an unevaluated R expression (e.g. quote(2 + log(moo - 1))) and converts it into a character string that is readable by Gadget
1 | to_gadget_formula(ex, stocknames = NULL)
|
ex |
An unevaluated R expression (i.e. enclosed in quotes) |
stocknames |
Optional. Character vector of stocknames to add to any formula variable names |
Gadget uses reverse Polish notation to read formulas (i.e. the operator comes first, followed by the items to be operated on; 2 + 2 is read as (+ 2 2)). This function will take an expression recognizable by R and convert it to one that is recognizable by Gadget
A character vector that is readable as a Gadget formula
1 2 | to_gadget_formula(quote(2 + 2))
to_gadget_formula(quote(2 + log(moo - 1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.