[R] na.approx and columns with NA's

antonio rodriguez antonio.raju at gmail.com
Sun May 27 20:44:22 CEST 2007


Hi,

I have a object 'zoo':

dim(zz)
[1]  720 5551

where some columns only have NA's values (representing land data in a 
sea surface temperature dataset) I find straightforward the use of 
'na.approx' for individual columns from the zz matrix, but when applied 
to the whole matrix:

zz.approx<-na.approx(zz)
Erro en approx(along[!na], y[!na], along[na], ...) :
        need at least two non-NA values to interpolate

The message is clear, but how do I could skip those 'full-NA's' columns 
from the interpolation in order to perform the analysis over the columns 
which represent actual data with some NA's values

Best regards,

Antonio

-- 
=====
Por favor, si me mandas correos con copia a varias personas, 
pon mi dirección de correo en copia oculta (CCO), para evitar 
que acabe en montones de sitios, eliminando mi privacidad, 
favoreciendo la propagación de virus y la proliferación del SPAM. Gracias.
-----
If you send me e-mail which has also been sent to several other people,
kindly mark my address as blind-carbon-copy (or BCC), to avoid its
distribution, which affects my privacy, increases the likelihood of
spreading viruses, and leads to more SPAM. Thanks.
=====
Antes de imprimir este e-mail piense bien si es necesario hacerlo: El medioambiente es cosa de todos.
Before printing this email, assess if it is really needed.



More information about the R-help mailing list