odm_read_tbl: ODM read function

Description Usage Arguments Value Examples

View source: R/odm_read_tbl.R

Description

This function can retrieve meta data from an ODM database by table name and ID

Usage

1
odm_read_tbl(odm_tbl = "Seriescatalog", ID = NULL, channel = ODM)

Arguments

odm_tbl

name of the table in the ODM database

ID

id of entry in the table you are referencing

channel

connection handle as returned by odbcConnect (default value = ODM)

Value

A data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Establish connection with database
ODM <- odbc::dbConnect(odbc::odbc(), dsn = "ODM", database = "OD",
 UID = "update", PWD = rstudioapi::askForPassword("Database password"),
 Port = 1433)

# Get a list of sites in the database
odm_read_tbl(odm_tbl = "Sites")

# Get a list of data series in the database
odm_read_tbl(odm_tbl = "Seriescatalog")

## End(Not run)

D-ESC/ODMr documentation built on Sept. 16, 2021, 10:52 a.m.