View source: R/template_geographic_coverage.R
template_geographic_coverage | R Documentation |
Use this function to extract the unique location coordinates and names from a table or to create a blank template to manually fill.
template_geographic_coverage(
path,
data.path = path,
data.table,
lat.col,
lon.col,
site.col,
empty = FALSE,
write.file = TRUE,
x = NULL
)
path |
(character) Path to the metadata template directory. |
data.path |
(character) Path to the data directory. |
data.table |
(character) Table name containing geographic coordinates. |
lat.col |
(character) Column name containing latitude coordinates in decimal degrees, where latitudes south of the equator are negative. |
lon.col |
(character) Column name containing longitude coordinates in decimal degrees, where longitudes west of the prime meridian are negative. |
site.col |
(character) Column name containing site names. |
empty |
(logical) Whether to write an empty template file. |
write.file |
(logical; optional) Whether to write the template file. |
x |
(named list; optional) Alternative input to
|
Character encoding of metadata extracted directly from the tables are
converted to UTF-8 via enc2utf8()
.
geographical_coverage |
Columns:
|
## Not run:
# Set working directory
setwd("/Users/me/Documents/data_packages/pkg_260")
# For a table containing site coordinates and names
template_geographic_coverage(
path = "./metadata_templates",
data.path = "./data_objects",
data.table = "nitrogen.csv",
site.col = "site_name",
lat.col = "site_lat",
lon.col = "site_lon")
# For returning an empty template to be filled manually
template_geographic_coverage(
path = "./metadata_templates",
empty = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.