View source: R/nl_derivatives.R
| nl_turning_points | R Documentation |
From the derivative table returned by nl_derivatives, finds
turning points (values of x where the first derivative crosses zero),
inflection regions (intervals where the second derivative changes sign),
and slope regions (contiguous stretches where the curve is increasing,
decreasing, or flat).
nl_turning_points(deriv_df, x, time = NULL, tol = 1e-06)
deriv_df |
A data frame returned by |
x |
Character; name of the focal predictor column. |
time |
Optional character; name of the time column. Turning points are identified separately within each time level when supplied. |
tol |
Numeric tolerance for near-zero detection of d1. Default
|
A named list with three elements.
turning_points is a data frame with columns x,
time (if applicable), fit, and type
(one of "maximum", "minimum", or "saddle").
inflection_regions is a data frame with columns
x_start, x_end, time, and direction
("concave_to_convex" or "convex_to_concave").
slope_regions is a data frame with columns x_start,
x_end, direction, and time.
nl_derivatives, nl_plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.