[R] Failure to aggregate
    Dimitri Shvorob 
    dimitri.shvorob at gmail.com
       
    Wed Sep  8 10:18:52 CEST 2010
    
    
  
Mnay thanks fr suggestions. I am afraid this is one tough daatframe...
> t = sqldf("select h, count(*) from x group by h")
Error in sqliteExecStatement(con, statement, bind.data) : 
  RS-DBI driver: (error in statement: no such table: x)
In addition: Warning message:
In value[[3L]](cond) : RAW() can only be applied to a 'raw', not a 'double'
> t = aggregate(x["price"], by = x["h"], FUN = NROW) 
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
> t = aggregate(x["price"], by = x["h"], FUN = length) 
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
> t = tapply(x$price, by = x$h, FUN = length) 
Error in is.list(INDEX) : 'INDEX' is missing
> class(x)
[1] "data.frame"
> class(x$h)
[1] "POSIXt"  "POSIXlt"
> class(x$price)
[1] "integer"
-- 
View this message in context: http://r.789695.n4.nabble.com/Failure-to-aggregate-tp2528613p2530963.html
Sent from the R help mailing list archive at Nabble.com.
    
    
More information about the R-help
mailing list