list_sites: List sites in the EPD

Description Usage Arguments Value Examples

View source: R/EPDr-list_functions.R

Description

This function looks into the database and returns all combined information in the SITELOC and SITEDESC tables (see documentation of the EPD: http://www.europeanpollendatabase.net/data/downloads/image/pollen-database-manual-20071011.doc). This information refers to the sites where palynological samples were taken. Because the function returns a whole table, only a valid connection to the database is mandatory. However, the list of sites can be further restricted to specific countries, administrative regions, or a geographical region defined by geographical coordinates (longitude and latitude) of its corners.

Usage

1
list_sites(connection, country = NULL, region = NULL, coords = NULL)

Arguments

connection

PostgreSQLConnection. Object of class PostgreSQLConnection as returned by function connect_to_epd.

country

Character vector indicating the three letters code or the full name of the desired countries.

region

Character vector indicating two digit integer code or the full name of the desired regions.

coords

Vector of four numeric values, indicating the spatial extent in decimal degrees. The extent should be specified using the following format c(xmin, xmax, ymin, ymax). Where x represents longitude and y represents latitude.

Value

Data frame (data.frame) with eleven columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
epd.connection <- connect_to_epd(host = "localhost", database = "epd",
                                 user = "epdr", password = "epdrpw")
list_sites(epd.connection)
list_sites(epd.connection, "ESP")
list_sites(epd.connection, "Spain", "01")
summary(list_sites(epd.connection))
list_sites(epd.connection, coords = c(2.5, 22, 45.5, 53.5))
summary(list_sites(epd.connection, coords = c(2.5, 22, 45.5, 53.5)))

## End(Not run)

dinilu/EPDr documentation built on Aug. 22, 2019, 1:03 p.m.