Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 204742

Modifying line of reference for annual data

$
0
0

Having a data set called "data", and using the openair package, I created a timePlot using the following code:

a=timePlot(data, pollutant="pm2.5", type="site", avg.time="24 hour", plot.type="s", ref.y=list(h=37, lty=2, col="black", lwd=1.6), smooth=TRUE, ci=FALSE, ylab="", main="Concentración diaria promedio PM2.5 por estación de monitoreo", ylim=c(0,50))

Yielding the following result:

timePlot1

Notice the reference line I added at y=37 using the ref.y function, which represents the daily average concentration limit for pm2.5. However, I need to be 50 µg/m3 from March 1st to June 30th and 37 µg/m3 from July 1st onwards. That is according to my country's Air Quality Guidelines.

Sort of looking like this:

timePlot2

I'd deeply appreciate any help. Best regards.


Viewing all articles
Browse latest Browse all 204742

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>