准备站点对表

时间:2018-09-18 08:08:27

标签: gdm

我正在尝试将生物和环境数据帧“转换”为“站点对”格式,以便进行gdm分析。 我一直在写以下命令:

library(gdm)
attach(demo1)
speciesTab <- demo1[, c("EpiphyteSpecies", "Habitat", "Lat", "Long")]
envirTab <- demo1[, c(2:ncol(demo1))]
gdmTab <- formatsitepair(speciesTab, bioFormat=2, XColumn="Long", YColumn="Lat",
sppColumn="EpiphyteSpecies", siteColumn="Habitat",predData=envirTab)
  gdmTab[1:3,]

并获得以下错误:

Aggregation function missing: defaulting to length
Error: Can't use matrix or array for column indexing
In addition: Warning messages:
1: In if (!(class(predData) == "data.frame" |class(predData) == "matrix" |  :
  the condition has length > 1 and only the first element will be used
2: In formatsitepair(speciesTab, bioFormat = 2, XColumn = "Long", YColumn = "Lat",  :
  No abundance column specified, assuming species data are presence
3: In if (class(predData) == "RasterStack" | class(predData) == "RasterLayer" |  :
  the condition has length > 1 and only the first element will be used
4: Unknown or uninitialised column:  'gettingCoolSiteColumn'. 

data table

0 个答案:

没有答案