I have a R dataframe with a field date (type date), i want to query this dataframe using sqldf library, but the where condition doesn't seem to work on the date field.
The query I'm using is:
sqldf("select * from elog where
date >= '1997-01-01'
limit 6")
It returns me an empty dataframe even though 'elog' has lines having 1997-01-01 as date
You could try the same command after loading
library(RH2)
Or without it, you may need to feed the numeric value as @bergant indicated in the comments
the same using
sprintf
(@bergant's code)data