Referring to "Using R for Data Analysis and Graphics" by J H Maindonald, and available from the R site, I found the example on p.30 non-working:
> stem(qqnorm(possum$hdlngth))
Error in stem(qqnorm(possum$hdlngth)) : 'x' must be numeric
Since qqnorm(possum$hdlngth) plots, and
> class(possum$hdlngth)
[1] "numeric"
, the problem must be here:
> class(qqnorm(possum$hdlngth))
[1] "list"
Does 'stem' require numerical input? The help says so.
But how to render it numeric?:
> class(as.numeric(qqnorm(possum$hdlngth)))
Error: (list) object cannot be coerced to type 'double'

Can someone please enlighten me about what goes wrong/has changed here?

Uwe

______________________________________________
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