-bounces@r-
project.org] On Behalf Of Benstead, Jonathan
Sent: Tuesday, February 12, 2013 12:19 AM
To: r-help@r-project.org
Subject: [R] Inserting rows of interpolated data
Dear help list - I have light data with 5-min time-stamps. I would like
to insert four 1-min time-stamps between each row
Hi Jon,
zoo is great for tasks like this, not just for na.approx. :)
I would approach the problem like this:
library(zoo)
# put lightdata into a zoo object
z - with(lightdata, zoo(light,
as.POSIXct(paste(date, time), format=%m/%d/%y %H:%M:%S)))
# merge the above zoo object with an empty zoo
#
Dear help list - I have light data with 5-min time-stamps. I would like to
insert four 1-min time-stamps between each row and interpolate the light data
on each new row. To do this I have come up with the following code:
lightdata - read.table(Test_light_data.csv, header = TRUE, sep = ,) #
3 matches
Mail list logo