[R] replace Null with NA

Henrique Dallazuanna wwwhsd at gmail.com
Fri Feb 1 19:22:27 CET 2008


Try this:

x[x==""] <- NA

On 01/02/2008, My Coyne <mcoyne at boninc.com> wrote:
> I would like to replace all null ("") in a column of a matrix to NA, how
> would I do that without a do loop?
>
> Thanks
>
> --mc
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list