[R] Deleting rows and columns containing NA's and "" only

David Winsemius dwinsemius at comcast.net
Mon Feb 13 19:41:38 CET 2012


On Feb 13, 2012, at 1:05 PM, syrvn wrote:

> Hi,
>
> thanks for you suggestion.
>
> I finally solved it in a different way using apply and is.na for  
> TRUE NA's
> and if(as.character(x) == "NA") etc.
>
> However, I just spotted that read.xls seems to have problems reading  
> in
> special characters such as < or >.

Or could it be that you have problems in not reading the help pages  
carefully?

 > read.table(text="<NA>")
     V1
1 <NA>

 > read.table(text="<NA>", na.strings=c("<NA>","NA"))
   V1
1 NA

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list