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