# NOT RUN {
r <- rast(nrow=18, ncol=36, xmin=0)
v <- rep(NA, ncell(r))
v[150:250] <- 1
v[251:450] <- 2
values(r) <- v
bi <- boundaries(r, type="inner")
bo <- boundaries(r, type="outer")
bc <- boundaries(r, classes=TRUE)
plot(bc)
# }
Run the code above in your browser using DataLab