Get empty global grid

get_grid(res = 0.5, crs = leaflet:::epsg4326, val = NA)

Arguments

res

resolution, in decimal degrees (default 0.5)

crs

coordinate resolutions system, ie projection (default geographic coordinate system 4326, ie WGS84)

Value

global raster with extent -180 to 180 longitude, -90 to 90 latitude and specified resolution

Examples


# get half-degree global grid
get_grid(res=0.5)
#> class      : RasterLayer 
#> dimensions : 360, 720, 259200  (nrow, ncol, ncell)
#> resolution : 0.5, 0.5  (x, y)
#> extent     : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
#> crs        : +proj=longlat +datum=WGS84 +no_defs 
#> source     : memory
#> names      : layer 
#> values     : NA, NA  (min, max)
#>