is it possible to use lapply()
to dynamically fetch condition and then apply to data frame? For demonstration purpose, I have simplified example
e.g.
cond <- list("cyl==6", "mpg >= 21", "hp==110 & cyl==6")
I want to apply all conditions on mtcars
and then store output to new_mtcars
I am currently using for
loop and not sure if that is an efficient way to do it.