tags_df: Extract a data.frame of all tagged variables

View source: R/tags_df.R

tags_dfR Documentation

Extract a data.frame of all tagged variables

Description

This function returns a data.frame of all the tagged variables stored in a linelist. Note that the output is no longer a linelist, but a regular data.frame.

Usage

tags_df(x)

Arguments

x

a linelist object

Value

A data.frame of tagged variables.

Examples


if (require(outbreaks) && require(dplyr) && require(magrittr)) {

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

  ## get a data.frame of all tagged variables
  tags_df(x)
}

epiverse-trace/linelist documentation built on April 21, 2024, 9:42 a.m.