Learn R Programming

incidence2 (version 2.6.2)

accessors: Access various elements of an incidence object

Description

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, ...)

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.

Arguments

x

An R object.

...

Not currently used.

Examples

Run this code
.old <- data.table::setDTthreads(2)
if (requireNamespace("outbreaks", quietly = TRUE)) {
    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.table::setDTthreads(.old)

Run the code above in your browser using DataLab