[R] how to remove "numeric(0)" component from a list

From: song song <rprojecthelp_at_gmail.com>
Date: Mon, 28 Jun 2010 21:12:04 -0700


like this, the list is below, I want to remove the last one . not using newlist[-2], but using the function detect its component is numeric(0) and then remove it from the list.

newlist

[[1]]
[1] 2 3

[[2]]
[1] numeric(0)

[[3]]
[1] 7

        [[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. Received on Tue 29 Jun 2010 - 04:14:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Jun 2010 - 05:20:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive