[R] Conditional Interpolation

Laura Quinn laura at env.leeds.ac.uk
Thu Apr 14 13:02:06 CEST 2005


I am looking to perform a simple linear interpolation to fill a few small
gaps in a large data set.

The data set tends to be either continous with one or two gaps in it
(where I hope to perform the interpolation), or else it has large chunks
of data missing where I'd need to return an NA.

Also, I'm wanting to perform this on sequential "windows" in the data - ie
to return daily interpolated data from a year-long data set, or return an
"NA" for a day where insufficienty data is available.

This interpolation needs to be performed on a columwise basis (where
missing data points in adjacent columns are not related), on a
52000x22 matrix - with windows of 144 each.

Can someone please offer some advice, I at m getting confused with the
nesting of my loops!

I'm using V2.0.1 on linux.

Thanks,
Laura



Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT

tel: +44 113 343 1596
fax: +44 113 343 6716
mail: laura at env.leeds.ac.uk




More information about the R-help mailing list