1

I have a low-frequency time series of data on wind direction, originating from measurements three times a day (at 06, 12 and 18). I would like to match this time series on a high-frequency series of temperatures applying any kind of circular interpolation for the missing values. Could someone point me in the right direction how to achieve this?

The code below generates some sample data.

# create high-freq time series of temperature data

zw1 <- textConnection("datetime, temperature
01.01.2015 00:00, 1.1
01.01.2015 02:00, 0.8
01.01.2015 04:00, 0.7
01.01.2015 06:00, 0.5
01.01.2015 08:00, 0.2
01.01.2015 10:00, 0.6
01.01.2015 12:00, 2.3
01.01.2015 14:00, 2.7
01.01.2015 16:00, 2.4
01.01.2015 18:00, 1.5
01.01.2015 20:00, 0.4
01.01.2015 22:00, -0.5
02.01.2015 00:00, -0.8")

temps <- read.csv(zw1)

temps$datetime <- as.POSIXct(temps$datetime, format="%d.%m.%Y %H:%M")

# create low-freq time series of wind direction (circular data) to be interpolated
# onto the temperature data time series

zw2 <- textConnection("datetime, wind.direction
01.01.2015 06:00, 273
01.01.2015 12:00, 195
01.01.2015 18:00, 182
02.01.2015 06:00, 171")

wind <- read.csv(zw2)

wind$datetime <- as.POSIXct(wind$datetime, format="%d.%m.%Y %H:%M")
Djypvatn
  • 11
  • 2
  • I think you'll be able to get better answers to this question by including example datasets. – josliber Oct 26 '15 at 19:30
  • @josilber: You're right, some data are added. – Djypvatn Oct 26 '15 at 21:24
  • I am aware of the na.approx command as used in this [answer](http://stackoverflow.com/questions/13073686/interpolating-timeseries), but since it is based on linear interpolation it cannot deal with my data on wind direction I suppose. – Djypvatn Oct 27 '15 at 12:24

0 Answers0