Learn R Programming

teal.modules.clinical (version 0.10.0)

bracket_expr: Expressions in Brackets

Description

Groups several expressions in a single bracketed expression.

Usage

bracket_expr(exprs)

Value

a { object. See base::Paren() for details.

Arguments

exprs

(list of call)
expressions to concatenate into a single bracketed expression.

Examples

Run this code
adsl <- tmc_ex_adsl
adrs <- tmc_ex_adrs

expr1 <- substitute(
  expr = anl <- subset(df, PARAMCD == param),
  env = list(df = as.name("adrs"), param = "INVET")
)
expr2 <- substitute(expr = anl$rsp_lab <- d_onco_rsp_label(anl$AVALC))
expr3 <- substitute(
  expr = {
    anl$is_rsp <- anl$rsp_lab %in%
      c("Complete Response (CR)", "Partial Response (PR)")
  }
)

res <- bracket_expr(list(expr1, expr2, expr3))
eval(res)
table(anl$rsp_lab, anl$is_rsp)

Run the code above in your browser using DataLab