tots.per.location: function to compute totals per location

View source: R/covid19_anal.R

tots.per.locationR Documentation

function to compute totals per location

Description

function to compute totals per location

Usage

tots.per.location(
  data,
  geo.loc = NULL,
  confBnd = FALSE,
  nbr.plts = 1,
  info = ""
)

Arguments

data

data.frame with *time series* data from covid19

geo.loc

list of locations

confBnd

flag to activate/deactivate drawing of confidence bands base on a moving average window

nbr.plts

parameter to control the number of plots to display per figure

info

additional info to display in plots' titles

Value

a list or dataframe with totals per specified locations and type of case

Examples


# read data for confirmed cases
data <- covid19.data("ts-confirmed")
# compute totals per location for all the countries

tots.per.location(data)

# compute totals per location for 'Italy'
tots.per.location(data,geo.loc="Italy")
# compute totals per location for 'Italy' and 'Germany'
tots.per.location(data,geo.loc=c("Italy","Germany"))


covid19.analytics documentation built on Aug. 18, 2022, 9:06 a.m.