如何解决R中的交叉k函数问题

时间:2019-06-26 15:45:10

标签: spatstat

我当时正使用kcross研究多伦多的餐厅和停车场集群,但出现了一些错误。 这是我的数据的一部分: 类型X Y 餐厅43.75409 -79.34955 餐厅43.67074 -79.39139 餐厅43.64289 -79.42543 餐厅43.70423 -79.38823 餐厅43.66618 -79.31647 餐厅43.63844 -79.41724 餐厅43.69279 -79.26263 餐厅43.64171 -79.43219 餐厅43.64759 -79.39203 餐厅43.6449 -79.39172 餐厅43.74256 -79.31425 餐厅43.67272 -79.31957 餐厅43.73177 -79.40398 餐厅43.60052 -79.50552 餐厅43.64961 -79.38545 餐厅43.6576 -79.48768 餐厅43.66622 -79.38525 餐厅43.67066 -79.39407 餐厅43.67383 -79.46274 餐厅43.65371 -79.37582 餐厅43.64884 -79.38 餐厅43.68849 -79.39322 餐厅43.73679 -79.43852 餐厅43.64932 -79.37841 停车43.63543 -79.53902 停车43.68638 -79.59816 停车43.67502 -79.56266 停车43.64446 -79.52602 停车43.64664 -79.531 停车43.64254 -79.52758 停车43.64538 -79.5328 停车43.66137 -79.55822 停车43.68551 -79.5847 停车43.76722 -79.49017 停车43.59695 -79.51113 停车43.60013 -79.50408 停车43.60022 -79.50412 停车43.60027 -79.50413 停车43.60098 -79.50692 停车43.60126 -79.50511 停车43.61326 -79.49269 停车43.61487 -79.48946 停车43.62314 -79.51992 停车43.61739 -79.49624 停车43.6257 -79.50352 停车43.6269 -79.50251

#kcrossparkingrestaurant
REPA <- read.csv("REPA.csv", header=TRUE, sep=",")
WREPA <- ripras(REPA)

types <- factor(REPA$type)
REPA <- ppp(x = REPA$X, y = REPA$Y,window = WREPA,marks=types)
KREPA <- Kcross(REPA, i = "restaurant", j = "parking")
plot(KREPA)

0 个答案:

没有答案