| To: | Patrick Joseph <patrick_nospam@hotmail.com>, s-news@wubios.wustl.edu |
|---|---|
| Subject: | Re: How to drop null elements of a list? |
| From: | "Richard M. Heiberger" <rmh@temple.edu> |
| Date: | Mon, 23 Aug 2004 10:58:26 -0400 |
lst <- list(a=c(1:2), b=3:6)
lst.match <- lst[match(c("a","c"), names(lst), 0)]
Results
> lst
$a:
[1] 1 2
$b:
[1] 3 4 5 6
> lst.match
$a:
[1] 1 2
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: How to drop null elements of a list?, Dimitris Rizopoulos |
|---|---|
| Next by Date: | Keeping X axis labeling as dates not numbers, Sam Kamau |
| Previous by Thread: | Re: How to drop null elements of a list?, Dimitris Rizopoulos |
| Next by Thread: | Keeping X axis labeling as dates not numbers, Sam Kamau |
| Indexes: | [Date] [Thread] [Top] [All Lists] |