View source: R/collect_n_subject.R
| n_subject | R Documentation | 
Count number of unique subjects
n_subject(
  id,
  group,
  par = NULL,
  na = "Missing",
  use_na = c("ifany", "no", "always")
)
| id | A character vector of subject identifier. | 
| group | A factor vector of group name. | 
| par | A character vector of parameter name. | 
| na | A character string used to label missing values. Defaults to  | 
| use_na | A character value for whether to include  | 
A data frame summarizing the number of unique subjects in different arms.
library(r2rtf)
r2rtf_adae$TRTA <- factor(r2rtf_adae$TRTA)
r2rtf_adae$SEX[1:5] <- NA
n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA)
n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX)
n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX, use_na = "always")
n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX, na = "Null")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.