data <- tibble::tribble(
~"id", ~"event", ~"values",
"A", 1, NA,
"A", 2, 2,
"A", 3, 3,
"B", 1, NA,
"B", 2, NA,
"B", 3, 1
)
make_static(
data,
var_in = "values",
var_out = "static_nothing_excluded",
id = "id",
event = "event"
)
make_static(
data,
var_in = "values",
var_out = "static_excluding_1and2",
exclude = c("1", "2"),
id = "id",
event = "event"
)
Run the code above in your browser using DataLab