[R] Simple:: usage of stem() and hist()?
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Sat Dec 29 01:16:18 CET 2001
Alan Davis <adavis at saipan.com> writes:
> I must apologize in advance for asking a simple question. I am sure that a clue will be sufficient to get this show on the road. I am trying to graph tide prediction data in various ways. I haven't been able to answer this question after pouring over TFM.
>
> I read the datafile
> theight <- read.table("tides",header=TRUE)
>
> I do get a summary() or fivenum()
> summary(theight)
> fivenum(theight)
>
> But when I run
> stem(theight), I receive CONSISTENTLY the following message, no matter when I have done:
>
> > stem(theight)
> Error in stem(theight) : stem: x must be numeric
>
> The file looks like this:
> Height
> 0.225970
> 0.141066
> 0.058758
> -0.020346
> -0.095795
> -0.167275
> -0.234242
> -0.296408
> -0.353290
> -0.404554
> -0.450036
> -0.489219
> -0.521996
> -0.548133
> -0.567431
> ...
> etc
>
> Perhaps there is some manipulation necessary to make the data into a vector, but it isn't obvious to me what to do.
>
> Thank you for any clue whatsoever.
Try stem(theight$Height)
(read.table() returns a data frame. It could have multiple columns.)
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list