[R] removing NULL elements from a list

Ramon Diaz rdiaz at cnio.es
Mon Apr 14 16:09:58 CEST 2003


Dear All,

I have a list, where several components are NULL, and I'd like to obtain that 
very same list without the NULL components (i.e., I do not want to unlist or 
otherwise loose the rest of the list structure). I can do that with a loop, 
but how could I do it without a loop?

Thanks,

Ramón

-- 
Ramón Díaz-Uriarte
Bioinformatics Unit
Centro Nacional de Investigaciones Oncológicas (CNIO)
(Spanish National Cancer Center)
Melchor Fernández Almagro, 3
28029 Madrid (Spain)
Fax: +-34-91-224-6972
Phone: +-34-91-224-6900

http://bioinfo.cnio.es/~rdiaz



More information about the R-help mailing list