lin_cost | R Documentation |
Calculate cost of using linear model fit on points to estimate other points in the interval. Zero indexed.
lin_cost(x, y, w, min_seg, i, j)
x |
NumericVector, x-coords of values to group. |
y |
NumericVector, values to group in order. |
w |
NumericVector, weights. |
min_seg |
positive integer, minimum segment size (>=1). |
i |
integer, first index (inclusive). |
j |
integer, j>=i last index (inclusive); |
scalar, linear cost of [i,...,j] interval (inclusive).
lin_cost(c(1, 2, 3, 4), c(1, 2, 2, 1), c(1, 1, 1, 1), 1, 0, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.