Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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. Currently implemented situations include the output from integrate(), nlm(), cubature::adaptIntegrate(), and uniroot().

Usage

value(object, ...)

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

## Default S3 method:
value(object, ...)

Arguments

object

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

...

additional arguments (currently ignored).

Examples

integrate(sin, 0, 1) %>% value()
nlm(cos, p = 0) %>% value()
uniroot(cos, c(0, 2)) %>% value()

mosaic

Project MOSAIC Statistics and Mathematics Teaching Utilities

v1.8.3
GPL (>= 2)
Authors
Randall Pruim [aut, cre], Daniel T. Kaplan [aut], Nicholas J. Horton [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.