rmv <- function(rast, oldmapset, newmapset) {
# moves raster from oldmapset to newmapset
currmapset <- system("g.gisenv MAPSET", intern=TRUE)
mapset(newmapset)
system(paste0("g.copy rast=", rast, "@", oldmapset, ",", rast))
mapset(oldmapset)
rrm(rast)
mapset(currmapset)
invisible()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.