[R] (no subject)

Laura Cordero Llana laurina_cl at hotmail.com
Thu Aug 14 16:34:32 CEST 2008


Hi, I am working with R and I have some doubts. I working with daily data of MNEE parameter for 6 years (2001:2006). What I am trying to do is to replace missing data for a particular period of time of a particular year, with the mean of that variable for the rest of the years during that given period.For instance if I have missing data during the period 100:1000 during the year 2002 I want to replace that gap with the mean of the other five years. Apparently it is working but after running it gives an error:  Error in if (trim > 0 && n > 0) { : missing value where TRUE/FALSE neededWhat does it mean? Because after doing the means there is not NA values. I attach the code I wrote. If you need any explanation about the variables, please tell me.
 
All my best
 
Laura
 
  
_________________________________________________________________


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: period1.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080814/748caa90/attachment.txt>


More information about the R-help mailing list