.paired_data_pivot_wider | R Documentation |
Convert long paired data to wide
.paired_data_pivot_wider(data, by, variable, id)
data |
( |
by |
( |
variable |
( |
id |
( |
a wide data frame
cards::ADSL[c("ARM", "AGE")] |>
dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |>
dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |>
dplyr::arrange(USUBJID, ARM) |>
cardx:::.paired_data_pivot_wider(by = "ARM", variable = "AGE", id = "USUBJID")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.