[R] enter "missing" into missing fields

Bert Gunter gunter.berton at gene.com
Wed Nov 4 22:14:01 CET 2009


?NA
?read.table  (note the "na.strings" argument)

You would have to handle  character fields/columns (which would by default
be converted to factors)specially to convert blanks to missing within R.

Bert Gunter
Genentech Nonclinical Biostatistics
 
 -----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of frenchcr
Sent: Wednesday, November 04, 2009 11:40 AM
To: r-help at r-project.org
Subject: [R] enter "missing" into missing fields


if ive got an incomplete data set thats got thousands of rows and 80 columns
with random missing fields...like this say...

3 b 3
4    1
1 x 2

? how do i turn it into....

3    b       3
4 missing  1
1    x       2

...i.e., i want to insert the word "missing" into the fields that are empty?
-- 
View this message in context:
http://old.nabble.com/enter-%22missing%22-into-missing-fields-tp26203288p262
03288.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.




More information about the R-help mailing list