search for: timedif1

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

Did you mean: timediff
2011 Apr 11
0
joining data based upon a moving time window?
...102.86 3462.43 4/12/2003 18:41:00 7.96 104.29 6541.0 #####code: SortLoc = loc[order(loc$DateTime),] #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 { Sor...