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