mosaic (version 0.14.4)

value: Extract value from an object

Description

Functions like integrate() and nlm() return objects that contain more information that simply the value of the integration or optimization. value() extracts the primary value from such objects. Currenlty implemented situations include the output from integrate(), nlm(), adaptIntegrate(), and uniroot().

Usage

value(object, ...)

# S3 method for integrate value(object, ...)

# S3 method for default value(object, ...)

Arguments

object

an object from which a "value" is to be extracted.

...

additional arguments (currently ignored).

Examples

Run this code
# NOT RUN {
integrate(sin, 0, 1) %>% value()
nlm(cos, p = 0) %>% value()
uniroot(cos, c(0, 2)) %>% value()
# }

Run the code above in your browser using DataCamp Workspace