> # species occurrences
> DataSpecies <- read.csv("E:/shiyanshuju/lianqiao.csv", row.names = 1)
> head(DataSpecies)
Longtitude Latitude lianqiao
1 115.8796 31.67832 1
2 115.5969 31.60406 1
3 116.3663 39.96195 1
4 116.2249 40.27298 1
5 116.1780 40.26722 1
6 116.2113 39.98351 1
> # the name of studied species
> myRespName <- 'lianqiao'
> # the presence/absences data for our species
>
> myResp <- as.numeric(DataSpecies[,myRespName])
> # the XY coordinates of species data
> myRespXY <- DataSpecies[,c("Longtitude","Latitude")]
> # Environmental variables extracted from BIOCLIMts
> myExpl = stack( "E:/shiyanshuju/xinyinzigrd/shengzhangqiqiwen.grd",
+ "E:/shiyanshuju/xinyinzigrd/bio8.grd",
+ "E:/shiyanshuju/xinyinzigrd/bio10.grd",
+ "E:/shiyanshuju/xinyinzigrd/bio13.grd",
+ "E:/shiyanshuju/xinyinzigrd/bio17.grd",
+ "E:/shiyanshuju/xinyinzigrd/bio19.grd",
+ "E:/shiyanshuju/xinyinzigrd/aspect.grd",)
错误于.local(x, ...) : 缺少参数, 也没有缺省值
> # 1. Formatting Data
> myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,
+ expl.var = myExpl,
+ resp.xy = myRespXY,
+ resp.name = myRespName,
+ PA.nb.rep=1,
+ PA.nb.absences=2000,
+ PA.strategy='random')