2015年7月28日 星期二

7.28 Learning handling dataframe by sqldf in R

http://anythingbutrbitrary.blogspot.com/2012/08/manipulating-data-frames-using-sqldf.html
  • A useful blog for learning using sqldf to conduct query in R.

One more tip:
> s01 <- sqldf("select * from data where [group.code] = 'a'")
# The bracket avoids misunderstanding of dot in sqldf. The dot has another meaning
# in SQL (e.g., separating table name from column name) and is replaced by an
# underscore before sending the data to SQLite.
# URL: http://stackoverflow.com/questions/19019883/how-to-handle-column-names-not-supported-by-sqldf-in-r

沒有留言:

張貼留言