pg_insert_observations: Insert plots and samples in PostgreSQL

Description Usage Arguments Author(s)

Description

Plots and records of species in the plots will be jointly inserted in a PostgreSQL database, whereby a series of checks will be carried out previous to insert the data.

This function carry out a series of checks on the input data previous to import them in the database (if not errored). The variable 'original_number' will be used for cross-check identities of entries in samples and in header. Connection to taxa via 'TaxonUsageID'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
pg_insert_observations(conn, ...)

## S3 method for class 'PostgreSQLConnection'
pg_insert_observations(
  conn,
  samples,
  header,
  names2concepts,
  db_samples,
  db_header,
  geom,
  ...
)

Arguments

conn

A database connection provided by dbConnect.

...

Further arguments (not yet in use).

samples

A data frame including records of species in plots. Columns 'ReleveID' and 'TaxonUsageID' are mandatory in this object.

header

An object of class sp::SpatialPointsDataFrame including the information on the plots. In the attribute table the columns 'ReleveID' and 'original_number' are mandatory.

names2concepts, db_samples, db_header

Character vectors including the name of the respective schema and table in database.

geom

Character value indicating the name of the geometry variable in the database.

Author(s)

Miguel Alvarez kamapu78@gmail.com


kamapu/vegtables2 documentation built on July 8, 2021, 7:57 a.m.