Description Usage Arguments Value Examples

Calculate cost of using linear model fit on points to estimate other points in the interval. Zero indexed.

1 | ```
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).

1 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.