Fwd: RE: Package sqldf in R and dates manipulation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: RE: Package sqldf in R and dates manipulation

Mangalani




Sent from Samsung tablet.


Dear all,
 
I recently read the book “ R data preperation and manipulation using sqldf package”  by Djoni Darmawikarta 
However, I have a problem with manipulation of dates using this package, I do not get the expected results. Do I need to install some packages  to be able to subset the data by dates in sqldf?
 
I am not getting Djoni Darmawikarta email address.
 
Please see the practice data attached and advise,
 
Kind regards,
 
Mangalani Peter Makananisa (0005786)
South African Revenue Service (SARS)
Specialist: Statistical Support
TCEI_OR (Head Office)
Tell: +2712 422 7357, Cell: +2782 456 4669
 
 
product = read.csv('D:/Users/S1033067/Desktop/sqldf prac/sqlprac.csv', na.strings = '', header = T)
head(product)
library(sqldf)
sqldf()
 
# out-put
 
> sqldf("select * from product

+                 where (date(Launch_dt) >= date('01-01-2003'))
+      ")
[1] P_Code    P_Name    Launch_dt Price   

<0 rows> (or 0-length row.names)

 









DisclaimerPlease Note: This email and its contents are subject to our email legal notice which can be viewed at http://www.sars.gov.za/Pages/Email-disclaimer.aspx
         


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...