Description Usage Arguments Value Examples
View source: R/data_generator.R
Created by Vincent Runge. Generating data with a given model = changepoint relative positions + parameters + type of cost
1 | data_generator(n, chpts = NULL, means = 0, sd = 1, type = "gauss")
|
n |
number of data points to generate |
chpts |
vector of position of the changepoints in (0,n] (last element is always n). |
means |
vector of means of the data |
sd |
a positive number = the standard deviation of the data |
type |
a string defining the cost model to use: "mean", "variance", "gauss", "poisson" |
a vector of size n generated by the chosen model
1 2 3 | data_generator(100)
data_generator(20, chpts = c(10), means = c(0,10), type = "gauss")
data_generator(25, chpts = c(10,20), means = c(2,0,1), type = "gauss")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.