我有一个数据集,包括树木的位置和土壤C(SOC)的测量值。所有点(树和SOC)都有x(0,50), y(0,50)
个坐标。首先,我想检查一下树木(点)的接近程度是否会影响SOC(连续变量)。其次,我想仅使用一部分树进行相同的分析(例如,只有直径> 20厘米(dbh)的树)。可以使用包'spatstat'或'ads'在R中完成吗?我环顾四周,但还没有找到解决这个问题的方法。任何指针都将非常感谢!
示例来自(Simon et al.2013):http://postimg.org/image/goks26xr5/
数据:
library(spatstat)
soc<-data.frame(x=c(0,5,5,5,5,5,10,10,10,10,10,10,10,15,15,15,15,15.1,15.9,15,15,15,20,20,20,20,21,20,20,20,25,25,25,25,23,25,25,25,25,30,30,31.5,30,33,30,30,30,30,35,35,35,35,35,35,35,35,35,40,40,40,40,40,40,40,45,45,45,45,45,50),
y=c(25,35,30,25,20,15,40,35.2,30,25,20,15,10,45,40,35,30,25,20,15,10,5,45,40,35,30,25,20,15,10,5,50,45,40,35,30,25,20,15,10,5,0,45,40,35,30,25,20,15,10,5,40,35,30,25,20,15.5,40,35,30,25,20,15,10,35,30,25,20,15,25),
zsoc=c(2,3,4,5,6,1,2,3,4,5,2,3,4,5,3,5,6,3,4,5,3,4,5,6,8,3,4,1,3,2,5,3,2,4,6,2,4,1,1,1,1,1,1,2,3,4,1,2,3,8,1.5,2,3,4,2.3,4,5,3,4,5,6,7,8,2,1,1,1,1,1,2))
tree<-data.frame(x=c(24,18,11,9,7,6,11,11,15,13,15,22,27,29,22,20,27,28,36,34,33,32,33,42,47,47,46,46,46,43,41,35,36,37,35,35,35,34,34,33,34,34,34,33,31,29,30,29,29),
y=c(28.8,31.2,32.0,24.0,18.4,17.6,13.1,11.9,11.1,5.8,3.6,1.5,8.3,13.3,15.7,17.3,19.0,19.1,14.4,10.8,6.1,4.9,2.7,2.7,11.3,11.8,12.3,10.1,19.9,24.4,23.0,25.6,31.0,34.6,36.5,36.9,36.8,38.4,35.6,37.0,39.6,39.5,41.6,41.8,39.7,41.1,35.9,35.8, 35.0),
zdbh=c(15,49,53,53,43,32,34,46,50,32,56,32,48,42,53,52,34,47,39,48,38,36,17,33,25,21,10,11,50,36,47,50,47,12,7,8,6,6,9,16,23,8,8,21,6,10,6,21,11))
soc <- ppp(soc[,1], soc[,2], c(0,50), c(0,50), marks=soc[3], unitname=c("meter"))
tree <- ppp(tree[,1], tree[,2], c(0,50), c(0,50), marks=tree[3], unitname=c("meter"))
希望这有效!
参考示例:Simón,N.,Montes,F.,Díaz-Pinés,E.,Benavides,R.,Roig,S.,Rubio,A.,2013。土壤有机碳库的空间分布霍尔姆橡木dehesa在西班牙。植物和土壤366(1-2),537-549。