desc_Tp: Tp

View source: R/desc-peak.R

desc_TpR Documentation

Tp

Description

Week where the maximum peak occurred.

Usage

desc_Tp(df)

Arguments

df

A data.frame with numeric 'cases' and 'epiweek' columns.

Details

This function is designed to be called by desc_year on data that has already been split into a single epidemiological year for a single spatial unit. Using it directly outside of that context is not recommended, as no input validation is performed.

Value

The computed Tp epidescriptor.

Examples

# Single spatial unit and epidemiological year
oneyear <- dengueRio[dengueRio$muni_code == 330455, ]
oneyear$time <- epiyearweek(oneyear$date)
oneyear <- oneyear[substr(oneyear$time, 1, 4) == "2019", ]
oneyear$epiweek <- as.numeric(substr(oneyear$time, 5, 6))
desc_Tp(oneyear)

epidesc documentation built on Aug. 8, 2026, 1:06 a.m.