| fun2form | R Documentation |
An accessorial function to convert an object of class 'function' to an object
of class 'formula'.
fun2form(fun, y = NULL)
fun |
a object of class 'function'. It must be a one-line-written function, with no curly braces "{}". |
y |
optional; a character defining the lef side of the formula, |
An object of class formula.
Numerical values into fun with three or more digits may cause miscalculation.
Anderson Rodrigo da Silva <anderson.agro@hotmail.com>
function, formula
g <- function(x) Asym * exp(-b2 * b3 ^ x) # Gompertz Growth Model
fun2form(g, "y")
# f1 <- function(w) {exp(w)} # error
# fun2form(f1, "x")
f2 <- function(w) exp(w) # ok
fun2form(f2, "x")
# End (not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.