Using sqldf package to filter