If one is building a substantial, organization-wide code base in R, is it acceptable practice to rely on the sqldf package as the default approach for data munging tasks? Or is best practice to rely on operations with R specific syntax where possible? By relying on sqldf, one is introducing a substantial amount of a different syntax, SQL, into their R code base.
I'm asking this question with specific regard to maintainability and style. I've searched existing R style guides and did not find anything on this subject.
EDIT: To clarify the workflow I'm concerned with, consider a data munging script making ample use of sqldf as follows:
library(sqldf)
gclust_group<-sqldf("SELECT clust,SUM(trips) AS trips2
FROM gclust
GROUP BY clust")
gclust_group2<-sqldf("SELECT g.*, h.Longitude,h.Latitude,h.withinss, s.trips2
FROM highestd g
LEFT JOIN centers h
ON g.clust=h.clust
LEFT JOIN gclust_group s
ON g.clust=s.clust")
And such a script could continue for many lines. (For those familiar with Hadoop and PIG, the style is actually similar to a PIG script). Most of the work is done using SQL syntax, albeit with the benefit of avoiding complex subqueries.