Learn R Programming

Covid19Wastewater (version 1.0.1)

date_distance_clamp: remove distances above threshold

Description

remove distances above threshold

Usage

date_distance_clamp(DF, vecNames, thresh)

Value

DF with distances above threshold clamped to threshold

Arguments

DF

source dataframe

vecNames

column names in DF to be modified

thresh

max distance not reduced to thresh from data

Examples

Run this code
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")

Run the code above in your browser using DataLab