# NOT RUN {
r <- rast(ncol=36,nrow=18)
v <- rep(NA, ncell(r))
v[500] <- 1
values(r) <- v
b <- buffer(r, width=5000000)
#plot(b)
v <- vect(rbind(c(10,10), c(0,60)))
b <- buffer(v, 20)
plot(b)
points(v)
crs(v) <- "+proj=longlat +datum=WGS84"
b <- buffer(v, 1500000)
plot(b)
points(v)
# }
Run the code above in your browser using DataLab