search for: timedif2

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

Did you mean: timediff
2011 Apr 11
0
joining data based upon a moving time window?
...),] #sorting the location data SortWeath = weather[order(weather$DateTime),] #sorting the weather data #### weathrow =1 for (i in 1:nrow(SortLoc)) { t = 0 while (t < 1){ timedif1 = difftime(SortLoc$DateTime[i], SortWeath$DateTime[weathrow], units="auto") timedif2 = difftime(SortLoc$DateTime[i], SortWeath$DateTime[weathrow+1], units="auto") if (timedif2<0){ if (abs(timedif1) } else { SortLoc$WndSp[i]=SortWeath$WndSp[weathrow+1] SortLoc$WndDir[i]=SortWeath$WndDir[weathrow+1]...