View source: R/dsmartr_collate.R
collate | R Documentation |
Processes the outputs of iterate
collate(iteration_stack = NULL, lookup = NULL, cpus = 1)
iteration_stack |
RasterStack or Brick; output |
lookup |
Data Frame; contains raster values and corresponding soil class labels. Example: 'data.frame': 38 obs. of 2 variables: $ VALUE: int 1 2 3 4 5 6 7 8 9 10 ... $ CLASS: chr "Ad" "An" "Bb" "Bh" ... |
cpus |
Integer; number of processors to use in parallel. |
A list of four RasterStacks:
dsmartr_predictions
: RasterStack, soil class prediction maps
in order of most to least-probable
dsmartr_probabilties
: RasterStack, a probability surface for
each layer of dsmartr_predictions
.
tallied_predictions
: RasterStack containing per-pixel tallies
of soil class occurrence.
tallied_probabilities
: RasterStack containing per-pixel
probabilities of soil class occurrence.
All outputs are written to disk as multiband GeoTIFFs before being assigned to the global environment.
This function can generate very large R temporary files. A rough
minimum disk space requirement is n
iterations * n
covariate
cells * 8 bytes * 2.
## Not run:
# run iterate() with the example data, then:
LUT <- levels(iteration_maps[[1]])[[1]]
collated <- collate(iteration_stack = iteration_maps, lookup = LUT,
cpus = max(1, (parallel::detectCores() - 1)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.