Skip to content

Commit

Permalink
fix: solve note (rlang::.data)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Jan 18, 2024
1 parent d67f159 commit efe5821
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) %>%
Expand Down Expand Up @@ -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) %>%
Expand Down

0 comments on commit efe5821

Please sign in to comment.