Learn R Programming

GADMTools (version 3.9-1)

gadm_removeBackground: Removes the background of a map

Description

Removes the backround previously loaded with gadm_getBackground. Original .tif file is not deleted.

Usage

gadm_removeBackground(x)
   
   gadm.removeBackground(x) # deprecated

Arguments

x

Object gadm_sp or gadm_sf of the region that you want to remove the background.

Value

Object gadm_sp or gadm_sf

See Also

gadm_getBackground

Examples

Run this code
# NOT RUN {
# library(GADMTools)
# Loads France @ level 2 (departements)
# FRA <- gadm_sf.loadCountries("FRA", level = 2, basefile = "DATA/")
# FRA <- gadm_getBackground(FRA, name = "FRABGND", clip = FALSE)
# plotmap(FRA)
# FRA <- gadm_removeBackground(FRA)
# plotmap(FRA)
# }

Run the code above in your browser using DataLab