[R] read.table and factor

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Feb 21 11:20:01 CET 2000


Bill Simpson <wsi at gcal.ac.uk> writes:

> No, so far as I can tell neither std nor cf contain non-numeric elements.
> This problem arises with every data file I read (the files are created by
> a C program). I attach a file--std and cf are numeric, yet read.table
> 
> d<-read.table("~/papers/letter/data/ws60.dat",header=TRUE)
> 
> makes d$std and d$cf factors.


?????!!!...:

> summary(read.table('/tmp/billS.txt', header=T))
      std             cf            hit             miss            fa       
 Min.   : 800   Min.   : 860   Min.   :20.00   Min.   : 1.0   Min.   : 5.00  
 1st Qu.: 890   1st Qu.: 950   1st Qu.:32.00   1st Qu.:10.0   1st Qu.:11.00  
 Median : 995   Median :1055   Median :35.50   Median :13.0   Median :14.00  
 Mean   : 995   Mean   :1055   Mean   :35.62   Mean   :12.9   Mean   :14.24  
 3rd Qu.:1100   3rd Qu.:1160   3rd Qu.:40.00   3rd Qu.:15.0   3rd Qu.:17.00  
 Max.   :1190   Max.   :1250   Max.   :49.00   Max.   :24.0   Max.   :28.00  
       cr       
 Min.   :26.00  
 1st Qu.:33.00  
 Median :37.50  
 Mean   :37.24  
 3rd Qu.:41.75  
 Max.   :54.00  


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