From d01a5bc7ae7f6aa601cfefdff83c3d231cd79c65 Mon Sep 17 00:00:00 2001 From: Bruce Delo Date: Tue, 20 Feb 2024 10:05:14 -0400 Subject: [PATCH] Filtered releases out of the receiver dataframe when deriving it from detections. --- R/otn_imos_column_map.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/otn_imos_column_map.R b/R/otn_imos_column_map.R index 64a798c..d3609d8 100644 --- a/R/otn_imos_column_map.R +++ b/R/otn_imos_column_map.R @@ -288,12 +288,15 @@ otn_imos_column_map <- function(det_dataframe, rcvr_dataframe = NULL, tag_datafr ##' @keywords internal ##' derive_rcvr_from_det <- function(det_dataframe) { + #To start, we will filter the releases out of our detections dataframe. + no_releases <- det_dataframe %>% filter(receiver != "release") + # The first thing we need to do is gin up some inferred min and max deployment dates. # We'll use the following code to do so. rcvr_grouped <- NULL # Start by grouping the detections by station, and ordering them by date. - rcvr_grouped_list <- det_dataframe %>% + rcvr_grouped_list <- no_releases %>% group_by(station) %>% arrange(datecollected, .by_group = TRUE)