greenplum-db / PivotalR-archive

An convenient R tool for manipulating tables in PostgreSQL type databases and a wrapper of Apache MADlib.
https://pivotalsoftware.github.io/gp-r/
125 stars 53 forks source link

by (group-by #15

Closed mwillumz closed 10 years ago

mwillumz commented 10 years ago

Passing a list of factors to INDICES results in an error.

preview(by(x,x[1],mean))

works as expected

preview(by(x,x[1:2],mean))

does not. I don't see any documentation that suggests that using mutliple arguments in a GROUP BY clause isn't yet supported.

my specific error is as follows:

Error in preview(by(Geo, list(Geo$state_code, Geo$county_code), count)) : error in evaluating the argument 'x' in selecting a method for function 'preview': Error in x[state_code == "12" && county_code == "000", ] : error in evaluating the argument 'i' in selecting a method for function '[': Error in state_code == "12" && county_code == "000" : invalid 'x' type in 'x && y'

Not sure why the x type would be invalid...

walkingsparrow commented 10 years ago

The bug is fixed and in master now. As to CRAN, the bug fix will be included in the next release, which is v0.1.10.

Thank you for letting me know about this issue. Welcome to use PivotalR and MADlib.