print.linelist: Printing method for linelist objects

View source: R/print.linelist.R

print.linelistR Documentation

Printing method for linelist objects

Description

This function prints linelist objects.

Usage

## S3 method for class 'linelist'
print(x, ...)

Arguments

x

a linelist object

...

further arguments to be passed to 'print'

Value

Invisibly returns the object.

Examples

if (require(outbreaks)) {

  ## dataset we'll create a linelist from
  measles_hagelloch_1861

  ## create linelist
  x <- make_linelist(measles_hagelloch_1861,
    id = "case_ID",
    date_onset = "date_of_prodrome",
    age = "age",
    gender = "gender"
  )

  ## print object - using only the first few entries
  head(x)

  # version with a tibble
  if (require(tibble) && require(magrittr)) {
    measles_hagelloch_1861 %>%
      tibble() %>%
      make_linelist(
        id = "case_ID",
        date_onset = "date_of_prodrome",
        age = "age",
        gender = "gender"
      )
  }
}

epiverse-trace/linelist documentation built on March 24, 2024, 7:12 a.m.