tabela_historico: Convert the alert object into a data.frame and calculate...

Description Usage Arguments Value Examples

View source: R/alert_functions.R

Description

Function to organize the alert results for easy reading and inserting in the database. Also computes receptivity, transmission and incidence levels.

Usage

1
tabela_historico(obj, iniSE, lastSE, versao = Sys.Date())

Arguments

obj

object created by the pipeline.

versao

Default is current's date

ini_se

first week of the table. Default is the first date in obj.

last_se

last week of the table. Default is the last date in obj. To do.

Value

data.frame with the data to be written.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Several cities at once:
cidades <- getCidades(regional = "Norte",uf = "Rio de Janeiro", datasource = con)
res <- pipe_infodengue(cities = cidades$municipio_geocodigo[1:3], cid10 = "A90", 
finalday= "2018-01-10")
restab <- tabela_historico(res, iniSE = 201701) 
tail(restab)
# One city:
res <- pipe_infodengue(cities = 3304557, cid10 = "A90", 
finalday= "2015-01-10")
restab <- tabela_historico(res) 
tail(restab)

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