Learn R Programming

filteRjsats (version 1.0)

add_fish: Add Fish Data from ERDAPP to a Detection Dataframe

Description

This function takes a prefiltered detection dataframe from prefilter() and joins it to fish data downloaded from ERDAPP using the get_fish_data() function or formatted using the format_fish() function. Detections are then filtered further based on the date and time of tag release and expected battery life. Detections occurring before release of the tag or after 2x the expected battery life are removed.

Usage

add_fish(prefilter_file, fish)

Value

A filtered dataframe converting the raw detection data into rows of detections

Arguments

prefilter_file

a prefiltered detection dataframe from prefilter()

fish

a dataframe of fish data rectrieved from get_fish_data()

Examples

Run this code
# Add fish data to a detection dataframe and filter for only detections
# associated with tagged fish

add_fish(prefiltered_detects, cft_fish)

Run the code above in your browser using DataLab