assign_SEQ | R Documentation |
Assigns the "[DOMAIN]SEQ"
number by sorting the data set by the specified
variables and then grouping by "USUBJID"
.
assign_SEQ(tbl, key_vars, seq_prefix, USUBJID = "USUBJID")
tbl |
a data frame, the SDTM table |
key_vars |
a character vector of the key variables to sort by |
seq_prefix |
a string, the prefix for SEQ as per the spec (usually the two letter domain abbreviation) |
USUBJID |
a string, the column for the subject ID, USUBJID, default is
|
a sorted copy of the tbl
data frame with the new SEQ column
df <- data.frame(
USUBJID = paste("Subject", c(rep(1, 3), rep(2, 3))),
XXTESTCD = paste("T", rep(c(2, 3, 1), 2))
)
assign_SEQ(df, key_vars = c("USUBJID", "XXTESTCD"), seq_prefix = "XX")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.