Learn R Programming

linelist (version 2.0.0)

print.linelist: Printing method for linelist objects

Description

This function prints linelist objects.

Usage

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

Value

Invisibly returns the object.

Arguments

x

a linelist object

...

further arguments to be passed to 'print'

Examples

Run this code
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)) {
    measles_hagelloch_1861 |>
      tibble() |>
      make_linelist(
        id = "case_ID",
        date_onset = "date_of_prodrome",
        age = "age",
        gender = "gender"
      )
  }
}

Run the code above in your browser using DataLab