[R] R Help

Remko Duursma remkoduursma at gmail.com
Fri Feb 13 05:18:20 CET 2009


x <- list(integer(0),1,2)

x[sapply(x, length) > 0]


-------------------------------------------------
Remko Duursma
Post-Doctoral Fellow

Centre for Plant and Food Science
University of Western Sydney
Hawkesbury Campus
Richmond NSW 2753

Dept of Biological Science
Macquarie University
North Ryde NSW 2109
Australia

Mobile: +61 (0)422 096908



On Fri, Feb 13, 2009 at 3:07 PM, Stuart Jaffe <stuart.jaffe at gmail.com> wrote:
> Hi,
>   I have a list of numbers (classified as a list) that contains integer(0)
> empty vectors. How do I convert those integer(0) into NAs? Thanks
>
>        [[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.
>




More information about the R-help mailing list