bd_within_time_period: bd_within_time_period

View source: R/bd_within_time_period.R

bd_within_time_periodR Documentation

bd_within_time_period

Description

top Check what herds were in BD in a particular year

Usage

bd_within_time_period(df, year_bd_started, time_period)

Arguments

df

BD dataset (bd_df). Created using bd_dataset_fun (bd_df <- bd_dataset_fun(master_tb))

year_bd_started

years to check if herd was in a BD during this time.

time_period

Time period (in days) to see if herd was in BD prior to BD of interest which started in (year_bd_started).

Details

DETAILS

Value

returns new indicator column(s) in BD dataset (0 = not in BD within time_period, 1 = BD within time_period).

Examples

## Not run: 
if(interactive()){
bd_df <- bd_within_time_period(bd_df, 2015, 365)
bd_df <- bd_within_time_period(bd_df, 2016, 730)}

## End(Not run)

044mj/cvera documentation built on Feb. 13, 2023, 10:02 p.m.