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.

______________________________________________
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