bayes_summary {bayesEO}R Documentation

Summary of categorical maps

Description

Takes a classified image with probabilities, and labels the image with the pixel of higher probability

Usage

bayes_summary(x, scale = 1, sample_size = 15000)

Arguments

x

SpatRaster categorical object

scale

Scale to apply to data

sample_size

Sample size

Value

A tibble with information

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Examples

if (bayes_run_examples()) {
    # select a file with probability values
    data_dir <- system.file("/extdata/probs/", package = "bayesEO")
    file <- list.files(data_dir)
    # create a SpatRaster object from the file
    probs_file <- paste0(data_dir, "/", file)
    # provide the labels
    labels <- c("Water", "ClearCut_Burn", "ClearCut_Soil",
             "ClearCut_Veg", "Forest", "Wetland")
    # read the probs file
    probs <- bayes_read_probs(probs_file, labels)
    # produce a labelled map
    map <- bayes_label(probs)
    # plot the labelled map
    bayes_summary(map)
}


[Package bayesEO version 0.2.1 Index]