delete.region: deletes a region from the region_definitions-definition file

View source: R/delete.region.r

delete.regionR Documentation

deletes a region from the region_definitions-definition file

Description

deletes a specified region from the region_definitions-definition file

Usage

delete.region(region,lib.folder,restore=F)

Arguments

region

Character string identifying the region that should be deleted. See region_definitions for area definitions and use add.region to add new regions.

lib.folder

Character string indicating R-library path in which the oceanmap-package is installed.

restore

whether the original region_definitions-file should be restored.

Author(s)

Robert K. Bauer

See Also

add.region, region_definitions, regions, writebin

Examples

## Example 1: Add region by supplying a one-row data.frame 
##            that holds the entire required information
data(region_definitions)
lion <- region_definitions[region_definitions$label == 'lion',] # selecting Gulf of Lions region
lion
junk <- lion 
junk$label <- 'junk' # rename region label
#add.region(junk) # add junk region
data(region_definitions) # reload region_definitions
region_definitions[,1:9]

## Example 2: Delete region
#delete.region("junk") # delete junk region
data(region_definitions) # reload region_definitions
region_definitions[,1:9]

oceanmap documentation built on Nov. 10, 2023, 5:08 p.m.