[R] Problems with read.table
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Tue Nov 9 17:58:34 CET 1999
"Heberto Ghezzo" <heberto at MEAKINS.Lan.McGill.CA> writes:
> -- so now, how can I read the file as numeric vectors?
>
> > fvcpp
> [1] "99.28 " "86.97 " "81.12 " "98.12 " "90.50 "
> > fvcpp<-as.numeric(fvcpp)
> > fvcpp
> [1] 99.28 86.97 81.12 98.12 90.50
> > mean(fvcpp)
> [1] 91.198
> >
>
> -- this is obviously not the way to do it, for each variable
> change it into numeric.
>
> Can somebody tell me what I am doing wrong?, I used to follow the same
> procedure a<-read.table(... attach(a) and have all my variables as
> vectors with or without NA's .
> This file has no NA's is all complete.
Do you have spaces before the commas in your file?
--
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