#' Create a source map, where all values other than focal value become NA
#'
#' @param x A SpatRaster object
#' @param value The cell value to create source surface from, default is 1
#'
#' @return A SpatRaster object
#'
#' @export
source_map <- function(x, value = 1){
x[x != value] <- NA
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.