Hello,
Both Gabor's and my way work and produce the same results:
#-- Gabor
library(zoo)
library(chron)
data1 <- "
01:23:40 5
01:23:45 10
01:23:50 12
01:23:55 7"
data2 <- "
01:23:42
01:23:47
01:23:51
01:23:54
01:23:58
01:23:59"
data1zoo <- read.zoo(text=data1, FUN=times)
data2zoo <- read.z
On 18/01/2013, Gabor Grothendieck wrote:
> On Fri, Jan 18, 2013 at 7:31 AM, e-letter wrote:
>> On 16/01/2013, Rui Barradas wrote:
>>> Hello,
>>>
>>> Like this?
>>>
>>>
>>> data1 <- read.table(text = "
>>> 01:23:40 5
>>> 01:23:45 10
>>> 01:23:50 12
>>> 01:23:55 7
>>> ")
>>>
>>> data2 <- read.tabl
On 18/01/2013, Gabor Grothendieck wrote:
> On Fri, Jan 18, 2013 at 7:31 AM, e-letter wrote:
>> On 16/01/2013, Rui Barradas wrote:
>>> Hello,
>>>
>>> Like this?
>>>
>>>
>>> data1 <- read.table(text = "
>>> 01:23:40 5
>>> 01:23:45 10
>>> 01:23:50 12
>>> 01:23:55 7
>>> ")
>>>
>>> data2 <- read.tabl
On Fri, Jan 18, 2013 at 7:31 AM, e-letter wrote:
> On 16/01/2013, Rui Barradas wrote:
>> Hello,
>>
>> Like this?
>>
>>
>> data1 <- read.table(text = "
>> 01:23:40 5
>> 01:23:45 10
>> 01:23:50 12
>> 01:23:55 7
>> ")
>>
>> data2 <- read.table(text = "
>> 01:23:42
>> 01:23:47
>> 01:23:51
>> 01:23:54
On 16/01/2013, Rui Barradas wrote:
> Hello,
>
> Like this?
>
>
> data1 <- read.table(text = "
> 01:23:40 5
> 01:23:45 10
> 01:23:50 12
> 01:23:55 7
> ")
>
> data2 <- read.table(text = "
> 01:23:42
> 01:23:47
> 01:23:51
> 01:23:54
> ")
>
> approx(as.POSIXct(data1$V1, format = "%H:%M:%S"), y = data1
Hello,
Like this?
data1 <- read.table(text = "
01:23:40 5
01:23:45 10
01:23:50 12
01:23:55 7
")
data2 <- read.table(text = "
01:23:42
01:23:47
01:23:51
01:23:54
")
approx(as.POSIXct(data1$V1, format = "%H:%M:%S"), y = data1$V2, xout =
as.POSIXct(data2$V1, format = "%H:%M:%S"))
Hope this h
Readers,
Am trying to use the function 'approx' to interpolate time series data sets:
data1:
01:23:40 5
01:23:45 10
01:23:50 12
01:23:55 7
data2:
01:23:42
01:23:47
01:23:51
01:23:54
The objective is to obtain interpolated values of 'data1' column 2 (5,
10, 12, 7) for the times shown in data2. T
7 matches
Mail list logo