search for: f__thierry

Displaying 1 result from an estimated 1 matches for "f__thierry".

2011 Jul 28
0
_: how to replace values in x by means in subgroups created in ...(not loops)
...) ) { Dff$x_m[index_Dff.start_0[i]:index_Dff.stop_0[i]]<-mean( Dff$x[index_Dff.start_0[i]:index_Dff.stop_0[i]],na.rm=T) } Dff$x_m } #replace_x_by_locallyMean_x_4_0s_in_y.f() #------------------------------------------------------- # replace_x_by_locallyMean_x_4_0s_in_y.f__Thierry # Arguments: function takes vectors x, y # these vector have the same length: length(x)==length(y) # function replaces in x # values that have in indexes in y # at least one zero in the same position in y # by locally compted mean of values in x # from al...