postgres2vegtable: Import PostgreSQL databases into vegtable objects

Description Usage Arguments Details Author(s) Examples

View source: R/postgres2vegtable.R

Description

Import and adaption of Postgres tables into objects of class vegtable.

Usage

1
2
3
4
5
6
7
## Importing taxlist objects
postgres2taxlist(conn, schema)

## Importing vegtable objects
postgres2vegtable(conn, header_schema, species_schema, relations_schema,
	samples_schema, layers_schema, coverconvert_schema, cover_names, geometry,
	description)

Arguments

conn

A database connection provided by dbConnect.

header_schema

A character value indicating the schema, where the table header is located.

species_schema,schema

Name of the schema containing taxonomic tables.

relations_schema

Name of the schema containing the relations to header.

samples_schema

Name of the schema containing the samples table.

layers_schema

Name of the schema containing the layers.

coverconvert_schema

Name of the schema containing the conversion table.

cover_names

Character vector indicating the variables in samples representing cover values.

geometry

Name of the variable including the geometry.

description

A named vector used as metadata for the vegtable object.

Details

In the case that some schemas are not mentioned, the function assumes such tables are located in the same schema as the table header. Thus for databases placed in just one schema, this need to be set only in argument 'header_schema'.

Author(s)

Miguel Alvarez, [email protected].

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(vegtable2)
conn <- dbConnect()
Data <- postgres2vegtable(conn, header_schema="veg_database",
	cover_names=c("bb_old","bb_new"), geometry="plot_centroids"
	description=c(database="my database", author="me"))
dbDisconnect(conn)
summary(Data)

## End(Not run)

kamapu/vegtable2 documentation built on Feb. 11, 2019, 9:15 a.m.