histograms in ggplot2_0.9.2.99

102 views
Skip to first unread message

pulpo

unread,
Sep 24, 2012, 10:17:43 AM9/24/12
to ggp...@googlegroups.com
Hi,

I'm trying to reproduce a simple histogram (taken from http://docs.ggplot2.org/current/geom_histogram.html): 

set.seed(5689)
movies <- movies[sample(nrow(movies), 1000), ]
# Simple examples
qplot(rating, data=movies, geom="histogram")

but it fails with this error:

stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.
Error in UseMethod("fullseq") : 
  no applicable method for 'fullseq' applied to an object of class "c('double', 'numeric')"
Error in UseMethod("scale_dimension") : 
  no applicable method for 'scale_dimension' applied to an object of class "NULL"


The same error is generated when trying to reproduce histograms that used to be OK in previous versions of ggplot2. Could anybody point out the right way to generate it?

Thanks in advance,

PS: My system looks like:

d> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] ez_4.1-1         stringr_0.6.1    scales_0.2.2     reshape2_1.2.1   plyr_1.7.1      
 [6] memoise_0.1      mgcv_1.7-21      lme4_0.999999-0  Matrix_1.0-9     lattice_0.20-10 
[11] ggplot2_0.9.2.99 car_2.0-14       nnet_7.3-4       MASS_7.3-21      devtools_0.8    

loaded via a namespace (and not attached):
 [1] colorspace_1.1-1   dichromat_1.2-4    digest_0.5.2       gtable_0.1.1       httr_0.1.1        
 [6] labeling_0.1       munsell_0.4        nlme_3.1-104       proto_0.3-9.2      RColorBrewer_1.0-5
[11] RCurl_1.91-1       stats4_2.15.1      tools_2.15.1      

Winston Chang

unread,
Sep 24, 2012, 10:59:31 AM9/24/12
to pulpo, ggp...@googlegroups.com
I think you also need to update the scales package.
-Winston


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

pulpo

unread,
Sep 24, 2012, 11:09:00 AM9/24/12
to ggp...@googlegroups.com, pulpo

Thanks! 

I had already installed the updated version of scales, but I forgot to restart R, now the plot is generated correctly with  only the Warning about the position_stack.

Cheers,
Reply all
Reply to author
Forward
0 new messages