R is great for numbers but seems to have no way to do the equivalent of select * from main where …, which is driving me crazy.