From efe5821abea8f0b39069c96909abbbc151de31c6 Mon Sep 17 00:00:00 2001 From: Nicolas Casajus Date: Thu, 18 Jan 2024 09:36:49 +0100 Subject: [PATCH] fix: solve note (rlang::.data) --- R/filter.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/filter.R b/R/filter.R index 9a30e56..d688287 100644 --- a/R/filter.R +++ b/R/filter.R @@ -44,7 +44,7 @@ filter_by_year <- function(data,years){ if (get_data_type(data)=="Sediment trap"){ filtered_dat <- data %>% filter(! is.na(.data$sample_date_time_start)) %>% - mutate(new_sample_date_start=gsub(' .*','',sample_date_time_start)) %>% + mutate(new_sample_date_start=gsub(' .*','', .data$sample_date_time_start)) %>% mutate(new_sample_date_start = dmy(.data$new_sample_date_start)) %>% mutate(year=year(.data$new_sample_date_start)) %>% filter(.data$year %in% year_vector) %>% @@ -80,7 +80,7 @@ filter_by_month <- function(data,months){ if (get_data_type(data)=="Sediment trap"){ filtered_dat <- data %>% filter(! is.na(.data$sample_date_time_start)) %>% - mutate(new_sample_date_start=gsub(' .*','',sample_date_time_start)) %>% + mutate(new_sample_date_start=gsub(' .*','', .data$sample_date_time_start)) %>% mutate(new_sample_date_start = dmy(.data$new_sample_date_start)) %>% mutate(month=month(.data$new_sample_date_start)) %>% filter(.data$month %in% month_vector) %>%