[R] horizontal boxplot + xlim

Ben Bolker bolker at ufl.edu
Tue Oct 7 17:55:12 CEST 2008


Antje <niederlein-rstat <at> yahoo.de> writes:


> I get a strange behaviour of a boxplot with the following code. There seems to 
> be a problem with the xlim-parameter. Did I do anything wrong? What else can I 
> do to force the boxplot to have a defined x-range?
> 
> x <- rnorm(100)
> boxplot(x, notch=TRUE, xlab=parameter, xlim <- c(-4,4), horizontal = TRUE)
> 

   This should be just fine if you say 

boxplot(x, notch=TRUE, xlab=parameter, xlim=c(-4,4), horizontal = TRUE)

instead.

<- is only for assignment.  You must use = for setting arguments
to a function.

  Ben Bolker



More information about the R-help mailing list