export_personnel: Connect to metabase and query for personnel list.

Description Usage Arguments Value

View source: R/export_personnel.R

Description

Connect to instance of LTER-core-metabase and query for personnel list with years associated (BLE LTER Core Program data package requirement).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
export_personnel(
  dbname = "ble_metabase",
  schema = "pkg_mgmt",
  dataset_ids,
  host = "localhost",
  port = 5432,
  user = NULL,
  password = NULL,
  write_to_file = TRUE,
  file_dir = getwd()
)

Arguments

dbname

(character) name of database. Defaults to "ble_metabase".

schema

(character) name of schema containing views. Defaults to 'pkg_mgmt'.

dataset_ids

(numeric) Number or numeric vector of dataset IDs to query.

host

(character) host name or IP address. Defaults to 'localhost'.

port

(numeric) port number. Defaults to 5432.

user

(character) (optional) username to use in connecting to database. Use to save time. If not supplied, the R console will prompt you to enter a username.

password

(character) (optional) password to user. Use to save time. If not supplied, the R console will prompt you to enter a password.

write_to_file

(logical) Whether to write to file. Defaults to TRUE. File name will have format "BLE_CP_<dataset ID>_personnel.csv".

file_dir

(character) Full path of directory to write file to. Defaults to current working directory.

Value

(data.frame) A data frame of personnel associated with specified dataset IDs as queried from metabase.


atn38/BLE-LTER-utils documentation built on Sept. 9, 2020, 7:49 p.m.