最初,我在ws(风速)和wd(风速)中有一些缺失的数据,
timestamp no pm hum
1 1404227061 49 2.5 54
2 1404227121 35 4.5 52
3 1404227181 27 6.6 49
4 1404227241 8 7.1 48
5 1404227301 51 8.4 46
6 1404227361 20 9.0 44
所以我必须用每日汇总数据填补空白,
dat <- transform(dat, wd = 230, ws = 2.160000 )
timestamp no pm hum wd ws
1 1404227061 49 2.5 54 230 2.16
2 1404227121 35 4.5 52 230 2.16
3 1404227181 27 6.6 49 230 2.16
4 1404227241 8 7.1 48 230 2.16
5 1404227301 51 8.4 46 230 2.16
6 1404227361 20 9.0 44 230 2.16
然后,我在openair包中运行这个函数,
polarPlot(dat, pollutant = "pm", na.rm = TRUE)
结果,
Error in cut.default(mydata[[x]], breaks = seq(0, max.ws, length = 31), :
'breaks' are not unique
这是什么意思?我该怎么做才能解决这个问题?或者我的数据不正确?
修改
更改了ws的值,
dat[4, "ws"] = 5.6
结果,
Warning message:
Not enough data to fit surface.
Try reducing the value of the smoothing parameter, k to less than 100.