[R] apply/looping query

Laura Quinn laura at env.leeds.ac.uk
Wed Jun 16 17:34:32 CEST 2004

I have several large matrices each having perhaps one or two
data points missing. For instance one point in 2881 is missing. As I want to perform
various analyses on these matrices I feel it is not
unreasonable to linearly interpolate over the missing points. I want to basically "fill in
the gaps" of the original matrix - the following piece of code
doesn't work and i'm not sure where i'm going wrong:

for(i in 1:20){

the error message says:

Error: more elements supplied than there are to replace

where am I going wrong??

Thanks in advance..

More information about the R-help mailing list