Hi all: My data: f1 f2 f3 f4 y 1 -4.45 3 6.44 3.72 1 2 25.66 121 39.03 3.55 0 3 -9.75 12 11.77 3.40 1 4 -12.09 17 13.75 3.33 0 5 -3.53 4 6.47 3.24 0 6 13.18 69 26.55 3.20 1 ... ... I want to plot f1 for y=0 and 1; f2 for y=0 and 1...and the same as f3,f4. And I want to get 4 plots at once(2*2) My code: par(mfrow=c(2,2)) densityplot(~f1,data=dat,group=y,auto.key=T) densityplot(~f2,data=dat,group=y,auto.key=T) densityplot(~f3,data=dat,group=y,auto.key=T) densityplot(~f4,data=dat,group=y,auto.key=T) The result is not what I want,since it produce 1 plot a time,but not 4 plots together(2*2). Maybe something wrong with par(mfrow=c(2,2))? Any suggestion? Many thanks!
Best. [[alternative HTML version deleted]] ______________________________________________ R-help@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.