curv_index_int {YEAB} | R Documentation |
Curvature index by numerical integration
Description
Curvature index by numerical integration
Usage
curv_index_int(cr, time_in)
Arguments
cr |
numeric, cumulative response |
time_in |
numeric, time (or the x axis in a cumulative response plot) |
Value
a numeric value that is the proportion of a rect triangle area minus the area under the curve
Examples
data("r_times")
r_times <- r_times[r_times < 60]
cr <- seq_along(r_times)
plot(r_times, cr, type = "s")
curv_index_int(cr, r_times)
segments(
x0 = min(r_times), y0 = min(cr),
x1 = max(r_times), y1 = max(cr)
)
segments(
x0 = min(r_times) + (max(r_times) - min(r_times)) / 2, y0 = min(cr),
x1 = max(r_times), y1 = max(cr),
col = "red"
)
[Package YEAB version 1.0.6 Index]