If the x-axis variable is really a factor, xYplot will not handle it. You probably need a dot chart instead (see Hmisc's Dotplot).

Note that it is unlikely that the confidence intervals are really symmetric.
Frank

On Tue, 27 Jul 2010, Kang Min wrote:

Hi,

I'm trying to plot a graph with error bars using xYplot in the Hmisc
package. My data looks like this.

mort                    stand         site    type
0.042512776   0.017854525   Plot A   ST
0.010459803   0.005573305     PF      ST
0.005188321   0.006842107    MSF    ST
0.004276068   0.011592129    YSF     ST
0.044586495   0.035225266   Plot A   LD
0.038810662   0.037355408     PF     LD
0.027567430   0.020523820    MSF   LD
0.024698872   0.020320976    YSF   LD

Having read previous posts on xYplot being unable to plot x-axis as
factors, I used numericScale, but I still get this error.

Error in label.default(xv, units = TRUE, plot = TRUE, default =
as.character(xvname),  :
 the default string cannot be of length greater then one

I used:

xYplot(cbind(mort, mort + stand, mort - stand) ~ numericScale(site) |
type, method="bars")

Am I missing something or doing something wrong?

Thanks.
KM

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

Reply via email to