if (require(outbreaks)) {
## dataset we will convert to linelist
head(measles_hagelloch_1861)
## create linelist
x <- make_linelist(measles_hagelloch_1861,
id = "case_ID",
date_onset = "date_of_prodrome",
age = "age",
gender = "gender"
)
## print result - just first few entries
head(x)
## check tags
tags(x)
## Tags can also be passed as a list with the splice operator (!!!)
my_tags <- list(
id = "case_ID",
date_onset = "date_of_prodrome",
age = "age",
gender = "gender"
)
new_x <- make_linelist(measles_hagelloch_1861, !!!my_tags)
## The output is strictly equivalent to the previous one
identical(x, new_x)
}
Run the code above in your browser using DataLab