lin_costs | R Documentation |

Built matrix of interval costs for held-out linear models. One indexed.

```
lin_costs(x, y, w, min_seg, indices)
```

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

`indices` |
IntegerVector, ordered list of indices to pair. |

xcosts NumericMatix, for j>=i xcosts(i,j) is the cost of partition element [i,...,j] (inclusive).

```
lin_costs(c(1, 2, 3, 4), c(1, 2, 2, 1), c(1, 1, 1, 1), 1, 1:4)
```

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.