Skip to contents

Access various elements of an incidence object

Usage

get_date_index_name(x, ...)

# S3 method for default
get_date_index_name(x, ...)

# S3 method for incidence2
get_date_index_name(x, ...)

get_dates_name(x, ...)

get_count_variable_name(x, ...)

# S3 method for default
get_count_variable_name(x, ...)

# S3 method for incidence2
get_count_variable_name(x, ...)

get_count_value_name(x, ...)

# S3 method for default
get_count_value_name(x, ...)

# S3 method for incidence2
get_count_value_name(x, ...)

get_group_names(x, ...)

# S3 method for default
get_group_names(x, ...)

# S3 method for incidence2
get_group_names(x, ...)

get_date_index(x, ...)

# S3 method for default
get_date_index(x, ...)

# S3 method for incidence2
get_date_index(x, ...)

get_dates(x, ...)

get_count_variable(x, ...)

# S3 method for default
get_count_variable(x, ...)

# S3 method for incidence2
get_count_variable(x, ...)

get_count_value(x, ...)

# S3 method for default
get_count_value(x, ...)

# S3 method for incidence2
get_count_value(x, ...)

get_groups(x, ...)

# S3 method for default
get_groups(x, ...)

# S3 method for incidence2
get_groups(x, ...)

Arguments

x

An R object.

...

Not currently used.

Value

  • get_date_index_name(): The name of the date_index variable of x.

  • get_dates_name(): Alias for get_date_index_name().

  • get_count_variable_name(): The name of the count variable of x.

  • get_count_value_name(): The name of the count value of x.

  • get_group_names(): The name(s) of the group variable(s) of x.

  • get_date_index(): The date_index variable of x.

  • get_dates(): Alias for get_date_index().

  • get_count_variable(): The count variable of x.

  • get_count_value(): The count value of x.

  • get_groups(): List of the group variable(s) of x.

Examples

data.table::setDTthreads(2)
if (requireNamespace("outbreaks", quietly = TRUE)) {
withAutoprint({
    data(ebola_sim_clean, package = "outbreaks")
    dat <- ebola_sim_clean$linelist
    i <- incidence(dat, date_index = "date_of_onset",
                   groups = c("gender", "hospital"))

    get_count_variable_name(i)
    get_group_names(i)
    get_dates_name(i)
})
}
#> > data(ebola_sim_clean, package = "outbreaks")
#> > dat <- ebola_sim_clean$linelist
#> > i <- incidence(dat, date_index = "date_of_onset", groups = c("gender", 
#> +     "hospital"))
#> > get_count_variable_name(i)
#> [1] "count_variable"
#> > get_group_names(i)
#> [1] "gender"   "hospital"
#> > get_dates_name(i)
#> [1] "date_index"