Get data for deployments of acoustic receivers, with options to filter results.
Usage
get_acoustic_deployments(
connection = con,
deployment_id = NULL,
receiver_id = NULL,
acoustic_project_code = NULL,
station_name = NULL,
open_only = FALSE
)
Arguments
- connection
A connection to the ETN database. Defaults to
con
.- deployment_id
Integer (vector). One or more deployment identifiers.
- receiver_id
Character (vector). One or more receiver identifiers.
- acoustic_project_code
Character (vector). One or more acoustic project codes. Case-insensitive.
- station_name
Character (vector). One or more deployment station names.
- open_only
Logical. Restrict deployments to those that are currently open (i.e. no end date defined). Defaults to
FALSE
.
Value
A tibble with acoustic deployment data, sorted by
acoustic_project_code
, station_name
and deploy_date_time
. See also
field definitions.
Examples
# Set default connection variable
con <- connect_to_etn()
#> Error: nanodbc/nanodbc.cpp:1135: 00000: [unixODBC][Driver Manager]Data source name not found and no default driver specified
# Get all acoustic deployments
get_acoustic_deployments(con)
#> Error in methods::is(connection, "PostgreSQL"): object 'con' not found
# Get specific acoustic deployment
get_acoustic_deployments(con, deployment_id = 1437)
#> Error in methods::is(connection, "PostgreSQL"): object 'con' not found
# Get acoustic deployments for a specific receiver
get_acoustic_deployments(con, receiver_id = "VR2W-124070")
#> Error in methods::is(connection, "PostgreSQL"): object 'con' not found
# Get open acoustic deployments for a specific receiver
get_acoustic_deployments(con, receiver_id = "VR2W-124070", open_only = TRUE)
#> Error in methods::is(connection, "PostgreSQL"): object 'con' not found
# Get acoustic deployments for a specific acoustic project
get_acoustic_deployments(con, acoustic_project_code = "demer")
#> Error in methods::is(connection, "PostgreSQL"): object 'con' not found
# Get acoustic deployments for two specific stations
get_acoustic_deployments(con, station_name = c("de-9", "de-10"))
#> Error in methods::is(connection, "PostgreSQL"): object 'con' not found