Re: [R] loop and plot

2009-10-19 Thread Johannes Graumann
Rene wrote: > Dear all, > > I am stuck at applying loop function for creating separated plots. > > I have coding like below: > > dataset.table <- > table(data.frame(var1=c(1,2,3,1,2,3,1),colour=c("a","b","c","c","a","b","b") > )) > kk = function(f) > { > ls=as.charac

Re: [R] loop and plot

2009-10-19 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
rwise, you'll again have only one figure...). Michael > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of joris meys > Sent: Montag, 19. Oktober 2009 13:12 > To: Rene > Cc: r-help@r-project.org > Subject

Re: [R] loop and plot

2009-10-19 Thread joris meys
,3,1,2,3,1),colour=c("a","b","c","c","a","b","b") > )) > kk = function(f) >             { >              ls=as.character(f) >              for (i in length(f)) >              { >              pie(dataset.ta

Re: [R] loop and plot

2009-10-19 Thread joris meys
Hi Rene, the problem is probably due to the fact that R will send all plots to the same graphical output window. Each next plot just replaces the previous one. if it's only a few plots, you can divide the graphical window with the commands par(mfrow=...) (see ?par) or layout(matrix(...)) (see ?la

Re: [R] loop and plot

2009-10-19 Thread Rene
Dear all, I am stuck at applying loop function for creating separated plots. I have coding like below: dataset.table <- table(data.frame(var1=c(1,2,3,1,2,3,1),colour=c("a","b","c","c","a","b","b") )) kk = function(f) { ls=as.character(f) pie(dataset.table