John Richardson John Richardson - 1 year ago 66
R Question

Select rows in data table using a variable

I have a data table that I would like to filter rows based on a variable string. For example:

The above works but this doesn't:


I have tried [[str]] but that doesn't work either.

Thanks for your help

Answer Source

It's not best practice to get into the habit of using this. I would recommend rethinking whatever process generates the string. With that said you can do

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download