most_likely: Extract most-likely-soil maps

View source: R/dsmartr_unstack.R

most_likelyR Documentation

Extract most-likely-soil maps

Description

This function takes the outputs of collate and extracts the top n most-likely soil maps. Optionally, their respective probability surfaces are also extracted.

Usage

most_likely(dsmart_preds = NULL, dsmart_probs = NULL, n_maps = 2L)

Arguments

dsmart_preds

RasterBrick; output dsmartr_predictions from dsmartr::collate().

dsmart_probs

RasterBrick; output dsmartr_probabilities from dsmartr::collate(); optional.

n_maps

integer; the number of most-probable maps desired.

Value

A list containing n_maps most-likely-soils maps, from most to least probable. Optionally; n_maps probability surfaces associated with most_likely_maps follow. All outputs are written to disk as GeoTIFFs.

Examples

## Not run: 
# run collate() example code, then:
most_likely_soil <-
 most_likely(dsmart_preds = collated[['dsmartr_predictions']],
             dsmart_probs = collated[['dsmartr_probabilities']],
             n_maps = 2)

## End(Not run)

obrl-soil/dsmartr documentation built on Feb. 1, 2024, 10:57 p.m.