plot: Visualisation of data, costs, penalty values and changepoint locations.
Description
Plot methods for an S4 object returned by crops. The plot can also be combined with the original data if required.
Usage
# S4 method for crops.class,data.frame
plot(x, y)# S4 method for crops.class,missing
plot(x)
Value
A ggplot object. Note - if no changepoints are detected in the penalty interval [beta_min,beta_max], then the value returned is NULL.
Arguments
- x
An instance of an S4 class produced by crops.
- y
A dataframe containing the locations and values of the data points. The data plot is plotted below, and is aligned with, the changepoint locations.
Examples
Run this code# see the crops example
# see the crops example
Run the code above in your browser using DataLab