I have a matrix named "spec" (see below), it is a 6x3 matrix, and each element 
of spec is a list. For example, spec[1,"wavenumber"] is a list, and it contains 
1876 numeric numbers and NAs. I want to replace the NAs to zero, but don't know 
how to change it, the difficulty may be all the elements are of the class list, 
so it is hard to change. 

Thank you for your help! 

matrix spec:

     wavenumber   prescan      postscan    
H001 Numeric,1876 Numeric,1876 Numeric,1876
H002 Numeric,1876 Numeric,1876 Numeric,1876
H003 Numeric,1876 Numeric,1876 Numeric,1876
H004 Numeric,1876 Numeric,1876 Numeric,1876
H005 Numeric,1876 Numeric,1876 Numeric,1876
H006 Numeric,1876 Numeric,1876 Numeric,1876
        [[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.

Reply via email to