date_distance_remove: remove distances above threshold

View source: R/library--data_prep--calculated_tools--date_vector_difference.R

date_distance_removeR Documentation

remove distances above threshold

Description

remove distances above threshold

Usage

date_distance_remove(DF, vecNames, thresh)

Arguments

DF

source dataframe

vecNames

column names in DF to be modified

thresh

max distance not removed from data

Value

DF with distances above threshold removed

Examples

data("Example_data", package = "Covid19Wastewater")
Example_data$Late_date <- sample(Example_data$date)
Example_data$Late_date[sample(1:length(Example_data), length(Example_data) / 3)] <- NA
df <- date_distance_calc(Example_data, "date", "Late_date")
date_distance_remove(df, "Late_date", 21)

Covid19Wastewater documentation built on Aug. 25, 2023, 1:07 a.m.