I have a data table that I would like to filter rows based on a variable string. For example:
mtcars=as.data.table(mtcars)
mtcars[cyl>=4]
The above works but this doesn't:
str='cyl>=4'
mtcars[str]
I have tried [[str]] but that doesn't work either.
Thanks for your help