我想用' Openair'来计算群集。包。我用以下内容读取了轨迹数据:
traj_2010 <- read.csv("C:/Users/stieger/Trajektorien/traj_10.csv", header=TRUE)
traj_2010$date <- as.POSIXct(strptime(traj_2010$date, format="%Y-%m-%d %H:%M", "GMT"))
traj_2010$date2 <- as.POSIXct(strptime(traj_2010$date2, format="%Y-%m-%d %H:%M", "GMT"))
因此,我有以下形式的轨迹数据:
head(traj_2010)
receptor year month day hour hour.inc lat lon height pressure date2 date
1 1 10 1 1 0 0 51.330 12.420 500.0 912.2 2010-01-01 00:00:00 2010-01-01
2 1 9 12 31 23 -1 51.350 12.523 464.1 915.2 2009-12-31 23:00:00 2010-01-01
3 1 9 12 31 22 -2 51.353 12.668 422.2 919.4 2009-12-31 22:00:00 2010-01-01
4 1 9 12 31 21 -3 51.329 12.840 380.9 922.0 2009-12-31 21:00:00 2010-01-01
5 1 9 12 31 20 -4 51.279 13.029 351.5 923.6 2009-12-31 20:00:00 2010-01-01
6 1 9 12 31 19 -5 51.218 13.240 335.1 924.2 2009-12-31 19:00:00 2010-01-01
我现在使用命令trajCluster
:
cluster_2010<-trajCluster(traj_2010, method = "Angle", n.cluster = 5, col = c("red2", "blue", "green3", "purple", "black"),
map.fill= FALSE, key=FALSE, main="2010", xlab="latitude", ylab="longitude", xlim=range(-35:35), ylim=range(35:70),
par.settings=list(axis.line=list(lwd=1.5), strip.border=list(lwd=2),
fontsize=list(text=32)))
它运行几分钟,但结果是:
|==============================================================================|100% ~0 s remaining Error in summarise_impl(.data, dots) :
Evaluation error: argument "x" is missing, with no default.
我有点困惑,因为在过去它没有问题。有人能帮助我吗?
我正在使用以下套餐:
library(openair)
library(plyr)
library(reshape2)
library(mapdata)
library(rworldmap)
library(dplyr)