get_stations: Get stations - merge deployments and detections data frame so...

Description Usage Arguments Details Value Examples

View source: R/get_stations.R

Description

Get stations - merge deployments and detections data frame so that the correct station name is associated with a given detection and receiver number

Usage

1
get_stations(detections_df, deployments_df)

Arguments

detections_df

Dataframe of Detections - currently requires that the datetime column be named "DateTimePST" and that the Receiver column be named "Receiver"

deployments_df

Dataframe of receiver deployments. Must have a Receiver column, a DeploymentStart column, and a DeploymentEnd column.

Details

It's important to appropriately join receiver and detection data in a way that ensures:

  1. the appropriate station is associated with receiver detections of a certain date range.

  2. we can double check that each detection is associated with a valid receiver deployment, i.e. that there are no "orphan" detections. The get_stations() function does this in one step. If you have NAs in your results (basically, detections that don't fall within any particular deployment window), the function will not fail but it will trip a warning.

Value

A merged dataframe with Receiver, DateTimePST, Station, and any other columns the detections_df had originally

Examples

1
2
3
## Not run: 
get_stations(dets, deps)
## End(Not run)

fishsciences/ybt documentation built on March 11, 2021, 8:45 a.m.