View source: R/local_min_max.R
local_min_max | R Documentation |
Gets local minimum and maximum of a given function expression on an interval using basic calculus criteria
local_min_max(f, f1der, f2der, what = c("min", "max"), x0, D)
f |
function expression |
f1der |
function expression of first derivative of |
f2der |
function expression of second derivative of |
what |
character. What to look for? A local |
x0 |
numeric givin global minimum or maximum of |
D |
numeric vector specifying the interval over which |
This function looks for critical values
over the interval [D[1],x0-1)
\cup
(x0+1, D[length(D)]]
.
A list containing:
x_opt
numeric giving the critical point where the local min or max
is achieved. When local min or max cannot be determined, this function returns NA
.
locals
numeric vector giving all critical points satisfying second derivative criteria.
crtPts
a list with 2 entries:
x_d1
numeric vector with local critical points over [D[1],x-1)
x_d2
numeric vector with local critical points over (x0+1,D[length(D)]]
type
character, what was found? A min
or a max
?
global_min_max
, phenopar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.