Lathouri, Maria
2008-Nov-13 16:20 UTC
[R] Boxplots with different variables and different ranges in R
Dear all, I am trying to make boxplots in one diagram but it is not working. Actually I have a large dataset, around 35 water quality variables with different units and of course in different ranges (some are orders of magnitude bigger than others). I want to produce one diagram with all the boxplots of the variables of my dataset. I tried these series of commands:>oldpar <- par(mfrow=c(1,ncol(R))) > invisible(apply(R, 2,boxplot)) > for (i in 1:ncol(R)) boxplot(R[,i], main=colnames(R)[i]) > par(oldpar)(where R is the name of my dataset) The problem is that after the second command, there is an error in plot.new( ): figure margins too large. Is there a way to overcome this and put all my variables in a same diagram? I tried with less number of variables, but I had the same warning. Thank you very much for your time and help. Kind regards Maria Lathouri [[alternative HTML version deleted]]
John Kane
2008-Nov-13 16:27 UTC
[R] Boxplots with different variables and different ranges in R
We need to have some idea of what the data looks like and what code you have been trying to make any sensible suggestions. Can you supply a small example ? --- On Thu, 11/13/08, Lathouri, Maria <m.lathouri06 at imperial.ac.uk> wrote:> From: Lathouri, Maria <m.lathouri06 at imperial.ac.uk> > Subject: [R] Boxplots with different variables and different ranges in R > To: r-help at r-project.org > Received: Thursday, November 13, 2008, 11:20 AM > Dear all, > > I am trying to make boxplots in one diagram but it is not > working. Actually I have a large dataset, around 35 water > quality variables with different units and of course in > different ranges (some are orders of magnitude bigger than > others). I want to produce one diagram with all the boxplots > of the variables of my dataset. > > I tried these series of commands: > >oldpar <- par(mfrow=c(1,ncol(R))) > > invisible(apply(R, 2,boxplot)) > > for (i in 1:ncol(R)) boxplot(R[,i], > main=colnames(R)[i]) > > par(oldpar) > > (where R is the name of my dataset) > > The problem is that after the second command, there is an > error in plot.new( ): figure margins too large. > > Is there a way to overcome this and put all my variables in > a same diagram? I tried with less number of variables, but I > had the same warning. > > Thank you very much for your time and help. > > Kind regards > > Maria Lathouri > > > > > [[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.__________________________________________________________________ [[elided Yahoo spam]]