If I have a variable holding a string representation of a comparative operator such as:
> comparison <- "=="
how can I interpolate this string version of the binary operator between its operands? E.g.
> 2 <insert comparison> 2
TRUE
NB. I do not want to use mapply(get(comparison),2,2 since I intend to put 2 <insert comparison> 2 as an argument to which.
I don’t quite understand why you don’t want to use
mapply, butdo.callis probably better anyway.