collect_tables: Collect tables from UWIN database

Description Usage Arguments Value Author(s) Examples

View source: R/utility_functions.R

Description

collect_tables uses the RODBC package to connect to the UWIN database and collect the requested tables.

Note: For this function to work the Microsoft Access Database Engine must be installed. It can be found here.

Usage

1
collect_tables(database = NULL, tables = NULL)

Arguments

database

File name of the UWIN Access database as a character vector. If database does contain an absolute path, the file name is relative to the current working directory.

tables

A character vector of the table names to be pulled from the UWIN database. If this argument is left blank then tables is set to include CameraLocations, Detections, Photos, Species, StudyAreas, Visits, lkupAction, lkupDetectionStatus, lkupSeasons, lkupVisitTypes.

Value

A named list of tables from the UWIN database. Each table will be returned as a data.table instead of a data.frame, as this considerably speeds up summarizing these data.

Author(s)

Mason Fidino

Examples

1
2
# not run: dat <- collect_tables("UWIN_DB_CHIL.accdb")
# not run: dat <- collect_tables("UWIN_DB_CHIL.accdb", tables = c("Photos", "Visits"))

mfidino/uwinr documentation built on Oct. 9, 2019, 10:02 p.m.