Learn R Programming

RcmdrPlugin.RiskDemo (version 3.2)

drawPositiveRate: Plotting the positive rate of COVID-19 tests or the tests per case

Description

This function plots a time series of either the positive rate of COVID-19 tests or the number of tests per case.

Usage

drawPositiveRate(data, countries, start = "2020-06-01", end = "last", 
    measure = "positive_rate", curve = TRUE, bars = FALSE, log = FALSE)

Value

No value.

Arguments

data

data frame including columns location (character string indicating the country), date (character string) and tests_per_case, positive_rate (numeric)

countries

vector of characters srings indicating the countries for which the selected statistic is plotted

start

beginning date of the time window for which the time series are plotted

end

ending date of the time window for which the time series are plotted

measure

statistic for which the time series are plotted

curve

logical indicating if smoothed curves are drawn

bars

logical indicating if bars are plotted

log

logical indicating if a log scale is used in the plot

Author

Arto Luoma <arto.luoma@wippies.com>

See Also

dataCovid, drawTests

Examples

Run this code
data(dataCovid)
drawPositiveRate(dataCovid,countries=c("Finland","France"))

Run the code above in your browser using DataLab