thigmophobe.labels() fails with error when supplied with an array
resulting from tapply (example below).
The error originates in thigmophobe()

I know the help page says 'numeric vector' but it would be kind of nice
if it worked with numeric things of class array too. I think it would
need no more than a couple of as.numeric() calls in thigmophobe itself,
or (simpler but slightly less useful) in the call to thigmophobe in
thigmophobe.labels.

As an aside, it might also be nice if the labels in thigmophobe.labels
defaulted to names(x) if present 

I would be happy to attempt a patch if someone can point me to the
right person and svn repository.

Steve Ellison.
[This is posted to R-help and not R-dev 'cos it's a wish, not a bug and
I don't want to clutter R-dev unnecessarily]


########
#
# Example:
#
########

require(plotrix)

x<-rnorm(500)
g<-factor(rep(colours()[1:50], 10))

m<-tapply(x,g,mean)
s<-tapply(x,g,sd)

plot(m,s)
thigmophobe.labels(m,s, labels=colours()[1:50]) #Throws error

thigmophobe.labels(as.numeric(m),as.numeric(s), labels=colours()[1:50],
cex=0.7) #Works OK

########


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
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.

Reply via email to