Description Usage Arguments Value See Also Examples
View source: R/makeQuantileSurface.R
Converts normalized probability surface (e.g. one layer output of isotopeAssignmentModel function) to quantile surfaces.
1 | makeQuantileSurfaces(probabilitySurface, rename = FALSE)
|
probabilitySurface |
Normalized probability surface RasterLayer |
rename |
Character value to append to raster name (e.g. "_quantile"). Defaults to FALSE. |
Returns RasterLayer rescaled to quantile values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Generate example probability surfaces.
myiso <- rasterFromXYZ(isoscape)
myiso_sd <- rasterFromXYZ(isoscape_sd)
df <- data.frame(
ID = c(-100, -80, -50),
isotopeValue = c(-100, -80, -50),
SD_indv = rep(5, 3)
)
assignmentModels <- isotopeAssignmentModel(
ID = df$ID,
isotopeValue = df$isotopeValue,
SD_indv = df$SD_indv,
precip_raster = myiso,
precip_SD_raster = myiso_sd,
nClusters = FALSE
)
# Convert to quantile surfaces.
quantile_surface <- raster::stack( lapply( unstack(assignmentModels), makeQuantileSurfaces) )
plot(quantile_surface)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.