search for: sortweath

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

2011 Apr 11
0
joining data based upon a moving time window?
...4/10/2003 22:41:00 6.70 106.00 17661.00 4/10/2003 23:41:00 6.60 106.00 22000.00 4/10/2003 0:41:00 6.18 106.00 22000.00 4/11/2003 17:41:00 8.17 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],...