Learn R Programming

mregions (version 0.1.8)

mr_names: Get region names - v2

Description

Get region names - v2

Usage

mr_names(layer, ...)

Arguments

layer

A layer name, one of MarineRegions:eez, MarineRegions:eez_boundaries, MarineRegions:iho, MarineRegions:fao, or MarineRegions:lme

...

Curl options passed on to httr::GET()

Value

a data.frame, or tibble, of class tbl_df (basically, a compact data.frame), with slots:

  • layer (character) - name of the layer (e.g. MarineRegions:eez)

  • name_first (character) - first part of the name, e.g., MarineRegions

  • name_second (character) - second part of the name, e.g., eez

  • id (character) - the feature ID

additional columns vary by layer

Examples

Run this code
# NOT RUN {
# mr_names gives a tidy data.frame
(res <- mr_names("MarineRegions:eez"))
(res <- mr_names('MarineRegions:eez_boundaries'))
(res <- mr_names('MarineRegions:iho'))
(res <- mr_names('MarineRegions:fao'))
(res <- mr_names('MarineRegions:lme'))
# }

Run the code above in your browser using DataLab