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

Description Usage Arguments Author(s) See Also Examples

View source: R/delete.region.r

Description

deletes a specified region from the region_definitions-definition file

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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 March 23, 2020, 5:06 p.m.