[R] Merge two ggplots

2010-11-21 Thread Alaios
et as an error message this: plot_shad_CR(CRX,CRY,1,CRagent,f) Error in eval(expr, envir, enclos) : object 'z' not found Calls: print ... lapply -> is.vector -> lapply -> FUN -> eval -> eval From: Dennis Murphy Cc: Rhelp Sent: Sat, No

Re: [R] Merge two ggplots

2010-11-21 Thread Dennis Murphy
Dennis > > and I get as an error message this: > > plot_shad_CR(CRX,CRY,1,CRagent,f) > Error in eval(expr, envir, enclos) : object 'z' not found > Calls: print ... lapply -> is.vector -> lapply -> FUN -> eval -> eval > > > -----

Re: [R] Merge two ggplots

2010-11-20 Thread Dennis Murphy
Hi: Perhaps a plus sign at the end of the line before geom_tile() would help. Dennis On Sat, Nov 20, 2010 at 6:30 AM, Alaios wrote: > Hello everyone. > I am using ggplot and I need some help to merge these two plots into one. > > plot_CR<-function(x,y,agentid,CRagent){ > library(ggplot2) > >

[R] Merge two ggplots

2010-11-20 Thread Alaios
Hello everyone. I am using ggplot and I need some help to merge these two plots into one. plot_CR<-function(x,y,agentid,CRagent){   library(ggplot2)     agent<-CRagent[[agentid]] # To make following expression shorter   ggplot((data.frame(x=CRX,y=CRY,sr=agent$sr)))+   geom_point(aes(x,y,colour=cu