episem: Define Epidemiological Week.

Description Usage Arguments Value Author(s) Examples

View source: R/utility_tools.R

Description

Find to which epidemiological week belongs a given day

Usage

1
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

1
2
3
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')

claudia-codeco/AlertTools documentation built on Aug. 12, 2021, 9:58 a.m.