AIL PROTECTED] Namens Gallego Liberman, Matias
Verzonden: vrijdag 15 februari 2008 10:09
Aan: r-help@r-project.org
Onderwerp: [R] storing ggplot objects as components of a vector
Hi.
I have a lot of plots that i need to store as components of a vector.
Here you have an example
> DF<-data.frame(A=rn
Gallego Liberman, Matias wrote:
> Hi.
>
> I have a lot of plots that i need to store as components of a vector.
> Here you have an example
>
>> DF<-data.frame(A=rnorm(12),B=c(1:12),C=rep(c(1:4),each=3))
>> Q<-c()
>> length(Q)<-3
You need a list, hence replace the last two lines by:
Q <- vec
Hi.
I have a lot of plots that i need to store as components of a vector.
Here you have an example
> DF<-data.frame(A=rnorm(12),B=c(1:12),C=rep(c(1:4),each=3))
> Q<-c()
> length(Q)<-3
> PAC<-geom_point(mapping=aes(x=A,y=B),data=DF[DF$C==1,])
> P<-ggplot()+PAC
> P #generates the plot
> Q[1]<-P
W
3 matches
Mail list logo