create_STAT | R Documentation |
Creates a –STAT variable and, if all measurements for a visit were not done, also changes all –TESTCD values as "–ALL"
create_STAT(
df,
domain,
nd_ind,
nd_ind_cd = "Yes",
USUBJID = "USUBJID",
VISIT = "VISIT"
)
df |
a data frame to modify |
domain |
a string, the domain abbreviation in all caps |
nd_ind |
a string, the variable name in |
nd_ind_cd |
a string, the code from the |
USUBJID |
a string, the variable name in |
VISIT |
a string, the variable name in |
a modified copy of df
df <- dplyr::tibble(
USUBJID = paste("Subject", c(rep("A", 2), rep("B", 4), rep("C", 2))),
VISIT = paste("Visit", c(1 , 2 , 1 , 1 , 2 , 2 , 2 , 2)),
XXTESTCD = paste("Test", c(1 , 2 , 1 , 2 , 1 , 2 , 1 , 2)),
ND = c("N", "N", "Y", "Y", "N", "N", "Y", "Y")
)
create_STAT(df = df, domain = "XX", nd_ind = "ND", nd_ind_cd = "Y")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.