Learn R Programming

sits (version 1.12.0)

sits_cluster_frequency: Cluster contigency table

Description

Computes the contingency table between labels and clusters. This function needs as input a sits tibble with `cluster` column.

Usage

sits_cluster_frequency(data.tb)

Arguments

data.tb

A tibble with `cluster` column.

Value

A matrix containing all frequencies of labels in clusters.

Examples

Run this code
# 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"))
# include the cluster info in the sits tibble
# 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)
# }

Run the code above in your browser using DataLab