Skip to contents

a consistent way to handle ... for dplyr extensions. This returns a list of quosures where each quosure contains an attribute biocmask:::ctx indicating which mask context it should be evaluate in.

Usage

biocmask_quos(..., .named = TRUE, .ctx_default = NULL, .ctx_opt = NULL)

Arguments

...

rlang dots, supports splicing an quoting

.named

should resulting expressions be named?

.ctx_default

default context to eval within

.ctx_opt

optional contexts to eval within

Value

a quosure with attribute biocmask:::ctx.

Examples


# in biocmask the default context is "assays"
# and optional contexts are "rows" and "cols"
quos <- biocmask_quos(
  foo = bar,
  ctx2(foo = bar),
  ctx3(foo = bar),
  .ctx_default = "ctx1",
  .ctx_opt = c("ctx2", "ctx3")
)
attr(quos[[1]], "biocmask:::ctx")
#> [1] "ctx1"
attr(quos[[2]], "biocmask:::ctx")
#> [1] "ctx2"
attr(quos[[3]], "biocmask:::ctx")
#> [1] "ctx3"