episem: Define Epidemiological Week.

View source: R/utility_tools.R

episemR Documentation

Define Epidemiological Week.

Description

Find to which epidemiological week belongs a given day

Usage

episem(x, format = "%Y-%m-%d", separa = "", retorna = "YW")

Arguments

separa

symbol between year and week

retorna

What should be return, if epidemiological year and week ('YW'), epi. year only ('Y') or epi. week only ('W'). Default: 'YW'.

date

date to be converted (class Date)

Value

epidemiological week or year. If separa = ”, the output is numeric; otherwise is a character.

Author(s)

Oswaldo Cruz

Examples

episem(x= as.Date("2018-12-31", format="%Y-%m-%d"))
episem(x= as.Date("2015-01-01", format="%Y-%m-%d"), separa='-')
episem(x= as.Date("2015-01-01", format="%Y-%m-%d"), retorna='Y')

AlertaDengue/AlertTools documentation built on Nov. 27, 2024, 11:55 p.m.