[R] Classification of wind events

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Mon May 18 13:11:52 CEST 2020


Hi Stefano,
If I understand your request, this may also help, Uses the same data
transformations as my previous email.

png("SS_foehn.png")
plot(mydf$data_POSIX,
 ifelse(mydf$main_dir %in% c("WSW","SW"),mydf$max_speed,NA),
 type="b",main="Wind speed (WSW or SW) by time",
 xlab="Time of day",ylab="Wind speed km/h",
 col=rainbow(16)[as.numeric(mydf$main_dir)])
abline(h=8,col="orange",lwd=2)
source("../rollmean.R")
rmws<-rollmean(mydf$max_speed,4)
lines(mydf$data_POSIX,rmws,col="orange",lwd=2)
legend("topleft","Rolling mean of 4 for wind speed",
 lty=1,lwd=2,col="orange")
dev.off()

Jim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SS_foehn.png
Type: image/png
Size: 34365 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200518/091f0aea/attachment.png>


More information about the R-help mailing list