View source: R/library--data_prep--calculated_tools--date_vector_difference.R
date_distance_clamp | R Documentation |
remove distances above threshold
date_distance_clamp(DF, vecNames, thresh)
DF |
source dataframe |
vecNames |
column names in DF to be modified |
thresh |
max distance not reduced to thresh from data |
DF with distances above threshold clamped to threshold
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.