if (FALSE) {
a <- rast(ncols=360, nrows=180, xmin=-180, xmax=180, ymin=-90, ymax=90,
crs="+proj=longlat +datum=WGS84")
values(a) <- 1:ncell(a)
sc <- warp_scale(a, "+proj=robin")
sc
# Use the median values
b <- project(a, "+proj=robin", xscale=sc$xscale["50%"], yscale=sc$yscale["50%"])
}
Run the code above in your browser using DataLab