
Last chance! 50% off unlimited learning
Sale ends in
Plot methods for S4 objects returned by mrc
. The plot produced depends on the type of the
S4 object.
For objects produced by mrc
a heatmap of the data is displayed along with the location of the univariate changepoints (yellow), most recent univariate changepoints (green),
and most recent multivariate changepoint locations (red).
A number of arguments with default values are provided to control aspects of how the data and changepoint locations are displayed. The plot methods return a ggplot2 object which can be modified if required.
# S4 method for changepoint.mv.mrc.class,ANY
plot(x, p = MDL(x), group = FALSE, display.variable.names = TRUE, show = TRUE)
An S4 class returned by mrc
.
Logical value used to indicate if the variates that share a most recent changepoint should be grouped together in the plot. Default is group=FALSE
.
Logical value. If display.variable.names=TRUE
then the variable names are displayed in the plot. If there are a large number of variates in the data, then it
can be useful disable variable names by setting display.variable.names=FALSE
. Default is display.variable.names=TRUE
.
Logical value used to indicate if the plot should be displayed (the ggplot object produced by plot is always invisibly returned). Default value is show=TRUE
.
Invisibly returns a ggplot object.
# NOT RUN {
# visualising most recent changepoints
data(mrcexample)
res<-mrc(mrcexample[,1:10])
p.1<-plot(res,p=2)
p.2<-plot(res,p=5)
p.3<-plot(res,p=2,group=TRUE)
p.4<-plot(res,p=5,group=TRUE)
if(require(gridExtra))
{
grid.arrange(p.1,p.2,p.3,p.4)
}
# }
Run the code above in your browser using DataLab