It seems to be a bug when you specify an x-label. # No xlab= works fine, but uses variable names to label x and # y axes
> sunflowerplot(Sepal.Length~Sepal.Width, data=iris) # These all throw the error message > sunflowerplot(Sepal.Length~Sepal.Width, data=iris, xlab="A") > sunflowerplot(Sepal.Length~Sepal.Width, data=iris, xlab="") > sunflowerplot(Sepal.Length~Sepal.Width, data=iris, xlab="Sunflowers") The work around would be to set up the plot and with plot() and then add the sunflowerplot > x <- range(iris$Sepal.Width) > y <- range(iris$Sepal.Length) > plot(x, y, type="n", xlab="A", ylab="") > sunflowerplot(Sepal.Length~Sepal.Width, data=iris, add=TRUE) ---------------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Gerrit Eichner > Sent: Wednesday, June 27, 2012 6:17 AM > To: R-Help > Subject: [R] formula version of sunflowerplot() fails when axis label > specified > > Hello, R-help, > > does anybody have already a work-around for the problem that the > formula > version of sunflowerplot() throws an error when provided with a value > for > xlab (or ylab) different from NULL: > > > sunflowerplot( Sepal.Length ~ Sepal.Width, data = iris, xlab = "A") > Error in model.frame.default(formula = Sepal.Length ~ Sepal.Width, data > = iris, : > variable lengths differ (found for '(xlab)') > > And are you -- the one with the work-around -- willing to share it? :) > > Best regards -- Gerrit > > --------------------------------------------------------------------- > Dr. Gerrit Eichner Mathematical Institute, Room 212 > gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen > Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany > Fax: +49-(0)641-99-32109 http://www.uni-giessen.de/cms/eichner > > ______________________________________________ > 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. ______________________________________________ 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.