[R] bug in qplot (library ggplot2)
Pierre-Olivier Chasset
pierre-olivier at chasset.net
Fri Jan 14 12:08:12 CET 2011
The corrected code:
library(ggplot2)
for (i in 1:2) {
png(file=paste('test ',i,'.png',sep=''))
print(qplot(carat, data=diamonds, fill=color,geom='histogram')+scale_y_continuous(i))
dev.off()
}
Thanks
Le 14/01/2011 02:17, Pierre-Olivier Chasset a écrit :
> Hello,
>
> this following code give a nice png:
>
> /library(ggplot2)
> i<- 1
> png(file=paste('test ',i,'.png',sep=''))
> qplot(carat, data=diamonds,
> fill=color,geom='histogram')+scale_y_continuous(i)
> dev.off()
> /
> I would like to get more files, but the following code doesn't make any
> file:
>
> /library(ggplot2)
> for (i in 1:2) {
> png(file=paste('test ',i,'.png',sep=''))
> qplot(carat, data=diamonds,
> fill=color,geom='histogram')+scale_y_continuous(i)
> dev.off()
> }
> /
> Have you got any idea?
> Have I made something false?
>
> Thanks,
>
> Pierre-Olivier
>
> R version 2.12.1 (2010-12-16)
> Platform: i386-redhat-linux-gnu (32-bit)
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list