get_samples: Retrieve samples information for EPD entities

Description Usage Arguments Value get_samples .get_psamples .get_pagedpt .get_pcounts .get_pvars .get_pvtrans .get_syntype .get_pgroup .get_groups Examples

View source: R/EPDr-get_functions.R

Description

Functions in this group retrieve information relative to the samples analized in an entity. The main function (get_samples) requires a valid connection to a database and the entity ID for the entity of interest. All other functions (starting with a dot [.]) use different arguments depending on the piece of information they retrieve

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17

Arguments

e_

numeric Value indicating the entity number (e_) of the database that want to be queried.

connection

PostgreSQLConnection Object of class PostgreSQLConnection as returned by function connect_to_epd.

var_

numeric Value indicating the variable identification number (var_) of the variable that is queried. Variables in the EPD are any data that is counted and stored for each of the samples. They can be biological particles (e.g., pollen), non-biological particles (e.g., added particles in the samples to calculate concentrations), or summary of the previous computed afterwards (e.g., total pollen sum), among others.

syntype

character One-character code indicating the type of synonym. It must be one of the following: M=morphological; N=nomenclatural; 1=name of a globally-monospecific genus (e.g. Zea); 2=name of a genus that is monospecific within a continent, but not globally (e.g. Tilia americana in North America); or <null> for accepted variables.

groupid

numeric Value indicating the group identification number that is required.

Value

samples-class object. This is an EPDr object with information from different tables. See documentation of the EPD: http://www.europeanpollendatabase.net/data/downloads/image/pollen-database-manual-20071011.doc).

get_samples

This function returns a samples-class object with several information from the rest of the functions in the group for a particular entity.

.get_psamples

This functions returns a data.frame with information in in the P_SAMPLE table for the specified entity. This corresponds with the sample depths for an entity. This table also stores an identifier for the worker who analyzed the sample.

.get_pagedpt

This functions returns a data.frame with information in in the P_AGEDPT table for the specified entity. This corresponds with fitted age estimates for the sample depths for each chronology specified for an entity. Names for each chronology are stored in the CHRON table. The age-depth data are generated by applying the age-model to the data in the AGEBASIS table.

.get_pcounts

This functions returns a data.frame with information in in the P_COUNTS table for the specified entity. This corresponds with the pollen counts for an entity. This table stores the non-zero counts for each combination of variable and sample depth (the depths values are stored in table P_SAMPLE).

.get_pvars

This functions returns a data.frame with information in in the P_VARS table for the specified entity. This corresponds with details on the variables (taxa, charcoals, etc) that have been counted in the biological samples (not for chronology).

.get_pvtrans

This functions returns a data.frame with information in in the P_VTRANS table for the specified entity. This corresponds with the names, codes and hierarchy information for each pollen variable recognized by the Pollen Database, including synonyms.

.get_syntype

This functions returns a data.frame with information in in the SYNTYPE table for the specified entity. This corresponds with full description of the synonym type codes used in P_VARS and M_VARS

.get_pgroup

This functions returns a data.frame with information in in the P_GROUP table for the specified entity. This corresponds with group to which each pollen variable is assigned. These tables enable the user to define taxa into groups based on the life form and habitat of each taxon (e.g. trees, aquatics).

.get_groups

This functions returns a data.frame with information in in the GROUPS table for the specified entity. This corresponds with a look-up table for the names and codes for variable groups.

Examples

1
2
3
4
5
6
7
## Not run: 
epd.connection <- connect_to_epd(host = "localhost", database = "epd",
                                 user = "epdr", password = "epdrpw")
chron.400 <- get_samples(400, epd.connection)
chron.400

## End(Not run)

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