NB: sqldf works by copying your data frame into a temporary SQLite database, running the query and then copying the data back. So it's not that fast.
Instead, learn a native R package like dplyr or data.table that supports all the power of SQL, and is v. v. fast.