drawBarsFin: Plotting epidemic statistics with Finnish data

View source: R/drawBarsFin.R

drawBarsFinR Documentation

Plotting epidemic statistics with Finnish data

Description

This function plots the new cases or total cases of an epidemic for selected regions in Finland.

Usage

drawBarsFin(data, pop, regions, start = "2020-06-01", end = "last", 
    measure = "new_cases", atop = TRUE, perMillion = FALSE, drawMean = TRUE, 
    bars = TRUE)

Arguments

data

data frame including columns Aika (character string indicating the date), Alue (character string indicating the region) and val (numeric indicating the number of new cases)

pop

data frame including columns Alue (character string indicating the region) and val (integer indicating the population)

regions

vector of characters strings indicating the regions for which the selected statistic is plotted

start

beginning date of the time window for which the curve is plotted

end

ending date of the time window for which the curve is plotted

measure

statistic to be plotted

atop

logical indicating if the bars of different regions are plotted on top of one another

perMillion

logical indicating if the statistic is proportioned to a population of million

drawMean

logical indicating if a smoothed curve (rolling mean of 7 observations) is plotted

bars

logical indicating if bars are plotted

Value

No value.

Author(s)

Arto Luoma <arto.luoma@wippies.com>

See Also

drawBars, dataCovidFin

Examples

data(dataCovidFin)
data(popRegionsFin)
drawBarsFin(dataCovidFin,popRegionsFin,regions=popRegionsFin$Alue[1:7])

RcmdrPlugin.RiskDemo documentation built on Nov. 13, 2023, 5:07 p.m.