Skip to content
Prev 248745 / 398506 Next

Problems replacing empty cells with NA values

Do 'str(data)' to see what the structure of the data is.  Are the
columns with <NA> character or factors?  Is this what you are seeing:
+ NA 1 b
+ 2 NA c
+ 3 4 NA
+ 3 2 1'))
V1  V2   V3
1 123 456    a
2  NA   1    b
3   2  NA    c
4   3   4 <NA>
5   3   2    1
'data.frame':   5 obs. of  3 variables:
 $ V1: int  123 NA 2 3 3
 $ V2: int  456 1 NA 4 2
 $ V3: Factor w/ 4 levels "1","a","b","c": 2 3 4 NA 1
[1] 1

        
On Fri, Jan 28, 2011 at 12:28 PM, Simone Santoro <miseno77 at hotmail.com> wrote: