#' east_west
#'
#' This function sets the right-most column (east) of raster to '1' (i.e. the source) and the left-most column (west) of the raster to '2' (i.e. the target)
#' @param raster Raster file of your study extent
#' @keywords Condatis, raster
#' @export
#' @import raster
#' @examples
#' r <- raster::raster(nrow=10, ncol=10)
#' east_west(r)
east_west<-function(raster){
x<-raster
x[]<-NA
x[,1] <- 2
x[,nrow(x)]<-1
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.