date_distance_calc: date_distance_calc

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

date_distance_calcR Documentation

date_distance_calc

Description

date_distance_calc

Usage

date_distance_calc(DF, base_date_vec, vecNames)

Arguments

DF

DF to extract vector from

base_date_vec

date flag vector to pull each distance from

vecNames

a vector of column vec names each with binary flagging info

Value

DF containing the distance of each term to the base vector

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
head(date_distance_calc(Example_data, "date", "Late_date"))

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