t0 <- as.POSIXct("2008-01-01 00:00:01", tz="UTC")
t1 <- as.POSIXct("2009-01-01 00:00:01", tz="UTC")
t <- seq(from=t0, to=t1, length.out=365)
lat <- rep(0, 365)
lon <- rep(0, 365)
a <- sun.angle(t, lat, lon)
par(mfrow=c(2,1))
plot(t, a$az, type='l', ylab="Azimuth [deg]")
plot(t, a$el, type='l', ylab="Elevation [deg]")
Run the code above in your browser using DataLab