My sqldf package was already updated. The result from the example you
ran is also missing 2 of the five days so something still isn't working
correctly.




|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
  |milton ruser <milton.ru...@gmail.com>                                        
                                                               |
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
  |Michael Rizzo/RTP/USEPA/u...@epa                                             
                                                                 |
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
  |r-help@r-project.org                                                         
                                                               |
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
  |07/30/2009 05:56 PM                                                          
                                                               |
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [R] Question regarding sqldf                                             
                                                               |
  
>--------------------------------------------------------------------------------------------------------------------------------------------|





How about update R/sqldf?

> require(sqlf)
Loading required package: sqlf
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE,  :
  there is no package called 'sqlf'
>
> testframe<-data.frame(sdate=rep(paste
+ ("day",1:5,sep=""),each=5),bext=runif(25,1,100),otherstuff=runif
+ (25,45,60),stuff=runif(25,3,25))
>
>
> maxdays<-sqldf("select distinct * from testframe group by sdate having
bext=max(bext)")
> maxdays
  sdate     bext otherstuff     stuff
1  day1 77.20252   51.77503 12.045835
2  day2 91.37352   50.07259  4.468679
3  day5 74.29047   58.58456 10.027444



______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to