I have a logical operator and a numeric value I want to pass as a single element to a statement in a function (I hear hundreds of R users groaning; I never do this but have a situation I feel it's ok to).
DF <- mtcars
overlap = "> 2"
as.numeric(rowSums(DF[, 1:6]) overlap)
How can I make the third line work like:
as.numeric(rowSums(DF[, 1:6]) > 2)
I know it's likely eval
and parse
but never use them so don't really understand how to use them here.