[R] Classification of wind events

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon May 18 17:26:29 CEST 2020


? source("../rollmean.R") ?

On May 18, 2020 4:11:52 AM PDT, Jim Lemon <drjimlemon using gmail.com> wrote:
>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

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list