library(Rbeast)
data(ohio) # Landsat surface references and NDVI at a single pixel observed over time
str(ohio)
if (FALSE) {
# ohio$ndvi is a single irregular time series
y = ohio$ndvi
o = beast.irreg(y, time=ohio$time,deltat=1/12)
plot(o)
print(o)
# ohio also contains irregular time series of individual spectral bands
# Below, run the multivariate version of the BEAST algorithm to decompose
# the 5 time series and detect common changepoints altogether
y = list(ohio$blue, ohio$green, ohio$red, ohio$nir, ohio$swir1);
o = beast.irreg(y, time=ohio$time,deltat=1/12, freq=12)
plot(o)
print(o)
}
Run the code above in your browser using DataLab