select_tags | R Documentation |
This function was equivalent to running successively tags_df()
and
dplyr::select()
on a linelist
object.
To encourage users to understand what is going on and in order to follow the
software engineering good practice of providing just one way to do a given
task, this function is now deprecated.
select_tags(x, ...)
x |
a |
... |
the tagged variables to select, using |
A data.frame
of tagged variables.
tags()
for existing tags in a linelist
tags_df()
to get a data.frame
of all tags
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"
)
head(x)
## check tagged variables
tags(x)
# DEPRECATED!
select_tags(x, "gender", "age")
# Instead, use:
library(dplyr)
x %>%
tags_df() %>%
select(gender, age)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.