daily_indicator: A Function to Simplify the Daily Cases Visualization Code

Description Usage Arguments Details Value Examples

View source: R/daily_indicator.R

Description

This function aims to simplify the code in c19euxplorer shiny app by selecting country, date, and the indicator in daily data to be visualized in Cases and Deaths Tab. This function would be used in the app.R file.

Usage

1
2
3
4
5
daily_indicator(
  df,
  indicator = c("Cases", "Cases per 10,000 people", "Deaths",
    "Deaths per 10,000 people")
)

Arguments

df

A daily COVID-19 tibble.

indicator

A shiny's input_id of indicator to be visualized

Details

You can also use this function outside the app. However, make sure to have these variables (with the exact same name) in your data frame in order to make the function works.

Value

A data frame containing the country, date, and the indicator.

Examples

1
2
3
4
## Not run: 
   daily_indicator(covid_eu_daily, input$indicator_select)

## End(Not run)

etc5523-2020/r-package-assessment-Dewi-Amaliah documentation built on Jan. 1, 2021, 1:10 a.m.