[datatable-help] SVN version of data.table breaks ggplot2

Chris Neff caneff at gmail.com
Tue Oct 11 14:52:09 CEST 2011


I'm sending this because it used to work with data.table and using the
latest SVN update kills it so I don't think it is a ggplot2 issue.

I can't find an easy data set that replicates this, but here is the
errors I get. Maybe that will lead to someone else knowing how to
replicate it.  If I do a simple plot:

ggplot(data) + geom_hex(aes(x=x, y=y))


Things work ok.  But if I do

ggplot(data) + geom_hex(aes(x=x, y=y)) + facet_wrap(~match)


where match is a grouping variable in data, I get:

Error: stat_binhex requires the following missing aesthetics: x, y
In addition: Warning message:
In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 3,4 --> row.names NOT used


The stuff about row names is confusing to me because data.table
doesn't do rownames right?

The reason I know it isn't ggplot2 (besides this stuff having worked
fine in the past) is because if I cast it to a data.frame, things work
fine:


df = as.data.frame(adgroup.data)

ggplot(df) + geom_hex(aes(x=x, y=y)) + facet_wrap(~match)



This runs with no issue.  I'm not sure what could be causing all this.
 I'm happy to help further debug if someone can give me some hints on
how to reproduce this on something besides the giant dataset that I
can't share.

-Chris


More information about the datatable-help mailing list