[R] missing values

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Mar 7 22:04:04 CET 2004


Grace Conlon <gracestat at yahoo.com> writes:

> How can I deal with missing values in the excel file? 
> I used read.csv to imports data, how ever there are missing values in the csv file. 
> When I use names(), it turns out a error message: " names attribute must be the same length as the vector" 
> What can i do with the missing values?

What were you trying to do with names and what has it got to do with
missing values??

How are the missing values coded in the csv file? If they are empty
fields, read.csv (btw, isn't it easier to export as delimited file and
use read.delim?) should handle them automatically, if not, try using
the na.strings argument.

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




More information about the R-help mailing list