# NOT RUN {
# Load the "dtwclust" package
library(dtwclust)
# load a simple data set with two classes
data(cerrado_2classes)
# calculate the dendrogram
dendro <- sits_dendrogram (cerrado_2classes, bands = c("ndvi"))
# create 6 clusters by cutting the dendrogram
clusters.tb <- sits_cluster(cerrado_2classes, dendro, k = 6)
# show clusters samples frequency
sits_cluster_frequency(clusters.tb)
# clear those clusters that are less that 25% of each cluster
cleaned.tb <- sits_cluster_clean(clusters.tb, min_perc = 0.25)
# show clusters samples frequency
sits_cluster_frequency(cleaned.tb)
# }
Run the code above in your browser using DataLab