vadr (version 0.01)

qqply: Repeatedly expand an expression against sequences of values.

Description

Performs template expansion as for qq, but evaluates over sequences (as in mapply).

Usage

qqply(...)(...)

Arguments

...
In the first argument list, one or more expressions or expressions to expand. These may have names, which will also be expanded. In the second argument list, vectors with optional names. The expressions will be expanded in a context that has these names bound to one value at a time from each sequence (inheriting from the calling frame).

Value

For qqply, a list of expressions. For qeply, the expressions will be evaluated in the calling frame.

See Also

qq bquote

Examples

Run this code
qqply(`.(x)` = .(y))(x=letters[1:3], y=1:3)

qe(function(
    .=...( qqply(`.(..1)`=.(..2))(letters, 1:26))) {
  ...(qqply(.(as.name(x)) <- .(as.name(y)))(y=letters[2:26], x=letters[1:25]))
  e
})

Run the code above in your browser using DataLab