Skip to content
Prev 326539 / 398502 Next

spped up a function

Hi Petr, yes the function basically consists on merging two time series with different time intervals: one regular 'GPS' and one irregular 'xact' (the latter containing the binomial variable 'wd' that I want to add to 'GPS'.
Apparently my attachments did not go through. Here you have the dputs you requested plus the desired result based on them:

head(xact)
Ringjul ? timepos ? actwd
6106933 15135 2011-06-10 04:36:15 ?3822 dry
6106933 15135 2011-06-10 05:39:57 ? ?27 wet
6106933 15135 2011-06-10 05:40:24 ? ?60 dry
6106933 15135 2011-06-10 05:41:24 ? ? 6 wet
6106933 15135 2011-06-10 05:41:30 ? 753 dry
6106933 15135 2011-06-10 05:54:03 ? ?78 wet
6106933 15135 2011-06-10 05:55:21 ? ?15 dry
6106933 15135 2011-06-10 05:55:36 ? ?18 wet

head(GPS1, 16) and desired result (added column wd)?

? ? ? Ring ? jul ? ? ? ? ? ? timeposwd
5 ?6106933 15135 2011-06-10 04:39:00dry
6 ?6106933 15135 2011-06-10 04:44:00dry
7 ?6106933 15135 2011-06-10 04:49:00dry
8 ?6106933 15135 2011-06-10 04:54:00dry
9 ?6106933 15135 2011-06-10 04:59:00dry
10 6106933 15135 2011-06-10 05:04:00dry
11 6106933 15135 2011-06-10 05:09:00dry
12 6106933 15135 2011-06-10 05:13:00dry
13 6106933 15135 2011-06-10 05:18:00dry
14 6106933 15135 2011-06-10 05:23:00dry
15 6106933 15135 2011-06-10 05:28:00dry
16 6106933 15135 2011-06-10 05:33:00dry
17 6106933 15135 2011-06-10 05:38:00dry
18 6106933 15135 2011-06-10 05:43:00dry
19 6106933 15135 2011-06-10 05:48:00dry
20 6106933 15135 2011-06-10 05:53:00dry

Santi
irregular
there's