filter_min_days: Filter dataframe for at least n cases per group

Description Usage Arguments Value

View source: R/preprocess-data.R

Description

The function computes the number of values for each group (e.g. country) and filters out those with less than the specified number of values. It is recommended to first group the dataframe for the stata the number of values have to be evaluated (e.g. at least 10 values in a country)

Usage

1
filter_min_days(data, min_n_days = 5)

Arguments

data

Dataframe (containing a day column)

min_n_days

Integer How many values must be available at least for each group

Value

A dataframe


jnshsrs/corona documentation built on April 9, 2020, 11:10 p.m.