norMix2call | R Documentation |
E.g., for taking symbolic derivatives, it may be useful to get an R
call
, expression
, or function
in / of x
from a specific "norMix"
object.
norMix2call(obj, oneArg = TRUE)
## S3 method for class 'norMix'
as.expression(x, oneArg = TRUE, ...)
## S3 method for class 'norMix'
as.function(x, oneArg = TRUE, envir = parent.frame(), ...)
obj , x |
an R object of |
oneArg |
|
envir |
an |
... |
potentially further arguments (not used in any examples yet). |
according to the function used, an R ‘language’ object, i.e., a
call
, expression
, or function
, respectively.
Martin Maechler
norMix
. Note that deriv()
currently only
works correctly in case of the default oneArg = TRUE
.
(cMW2 <- norMix2call(MW.nm2))
deriv(cMW2, "x")
(fMW1 <- as.function (MW.nm1))
(eMW3 <- as.expression(MW.nm3))
stopifnot(is.call (cMW2), is.call(norMix2call(MW.nm2, FALSE)),
is.function (fMW1), is.function (as.function (MW.nm4)),
is.expression(eMW3), is.expression(as.expression(MW.nm5))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.