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

How to get rollingMean function in R package Openair to work?

$
0
0

I'm trying to get the 8 hour rolling mean for o3 using the rollingMean function using this code:

mydata <- rollingMean(mydata, pollutant = "o3", hours = 8)
breaks <- c(0, 34, 66, 100, 121, 141, 160, 188, 214, 240, 500)
labels <- c("Low.1", "Low.2", "Low.3", "Moderate.4", "Moderate.5", "Moderate.6",
"High.7", "High.8", "High.9", "Very High.10")
calendarPlot(mydata, pollutant = "rolling8o3",breaks = breaks, labels = labels, cols = "jet", statistic = "max"

But I keep getting this error message:

Error in strsplit(interval, split = "") : non-character argument In addition: Warning message: In diff(as.numeric(unique(dates[order(dates)]))) : NAs introduced by coercion

Any help with this would be greatly appreciated I'm very new to R. Thanks


Viewing all articles
Browse latest Browse all 201839

Trending Articles



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