[R] RES: time series interpolation

tomtomme langkamp at tomblog.de
Thu Jun 30 13:10:37 CEST 2011


Thanks for the hints. Eitherway I´ve found another solution now:

w03_11temp<-read.delim2("w03_11.ASC", fileEncoding="ISO-8859-15", skip = 4) 
colnames(w03_11temp) <- c("date", "time", "temp") 
library(zoo) 
w03_11temp_z <- zoo(w03_11temp$temp,
  as.POSIXct(paste(w03_11temp$date, w03_11temp$time), format="%d.%m.%y
%H:%M:%S")) 
w03_11temp_y <- merge(w03_11temp_z, zoo(order.by=seq(start(w03_11temp_z),
end(w03_11temp_z), by=1))) 
w03_11temp_x <- na.approx(w03_11temp_y)  
w03_11temp_w <- data.frame(date=format(index(w03_11temp_x), "%d.%m.%y"),
                   time=format(index(w03_11temp_x), "%H:%M:%S"),
temp=coredata(w03_11temp_x)) 

--
View this message in context: http://r.789695.n4.nabble.com/time-series-interpolation-tp3633193p3635359.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list