maskByCountry | R Documentation |
Function to mask out cells outwith polygons defining a country within the UK
maskByCountry(r, countryName)
r |
A RasterLayer. |
countryName |
The name of a country within the UK ("Scotland", "Northern Ireland", "England" or "Wales"). |
A RasterLayer masked to the named country.
r <- getSpatRasterTemplate(domain = "UK", res = 10000, proj = 'OSGB')
r[] <- 1
r_masked <- maskByCountry(r, c("England", "Wales"))
plot(r_masked)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.