I was asking because the topic of this discussion is specifically running SQL queries (that's what TextQL does).
But, there certainly are good reasons for using SQL in R. Packages like sqldf exist, so their authors would probably be able to give the best answer to your question.
Some reasons:
- SQL is a very widely-known DSL for working with tabular data, so it may make sense to make that interface available within R.
- For certain operations (e.g. specific types of joins) it may be more natural / easier to express the operation in SQL.
- For large data sets, some operations in R have large memory footprints, and doing the operations in a database may have lower memory requirements.