make_wide.Rd
For a given child, this script joins measurements made within a specified window.
make_wide(
long,
instruments = c("gpa", "gto", "by3"),
days = 10L,
drop_na_age = TRUE,
include_return = FALSE,
quiet = FALSE
)
Long form data, typically created by scripts/edit_data.R
Character vector of instruments names. Currently supported instruments are `"gpa"`, `"gto"` and `"by3"`.
Non-negative integer, window width in number of days
Logical. Should measurements with missing ages be dropped?
Logical. Should the return visits be included in the join?
Logical. Print messages to terminal?
A data frame with one record per child. The first five columns are administrative variables, followed by the intervals in days per instrument. The remaining columns are items from the instruments.
if (FALSE) { # \dontrun{
joined <- make_wide(long, instruments = c("gpa", "gto"))
} # }