[Biomod-commits] (no subject)

Kristen Bouska kpitts at siu.edu
Tue Mar 12 20:22:51 CET 2013


Apologies for accidentally sending the previous message without my
question. When formatting my data, I keep receiving the following error *"No
pseudo absences selection !Error in validObject(.Object) :
  invalid class “BIOMOD.formated.data” object: invalid object for slot
"coord" in class "BIOMOD.formated.data": got class "NULL", should be or
extend class "data.frame"* and am unsure of what this means or how to solve
this problem. When I check the data, it appears to be set up how I'd like
it, but perhaps I have my code messed up? Please bear with me, I am a
beginner with both Biomod2 and R.

library(biomod2)
train_pa <- read.csv(system.file("
external/species/Train_PA.csv",
package="biomod2"))
myRespName <- 'PTM'
myResp <- as.numeric(train_pa[,myRespName])
test_pa <- read.csv(system.file("external/species/Test_PA.csv",
package="biomod2"))
myRespEval <- 'PTM'
myEvalpa <- as.numeric(test_pa[,myRespName])
train_env <-read.csv(system.file("external/bioclim/current/train_env.csv",
package="biomod2"))
myExpl <- as.data.frame(train_env)
test_env <-read.csv(system.file("external/bioclim/current/test_env.csv",
package="biomod2"))
myEvalenv <- as.data.frame(test_env)
myBiomodData <- BIOMOD_FormatingData(resp.var=myResp, expl.var=myExpl,
resp.name=myRespName, eval.resp.var=myEvalpa, eval.expl.var=myEvalenv)



On Tue, Mar 12, 2013 at 2:15 PM, Kristen Bouska <kpitts at siu.edu> wrote:

> library(biomod2)
> train_pa <- read.csv(system.file("external/species/Train_PA.csv",
> package="biomod2"))
> myRespName <- 'PTM'
> myResp <- as.numeric(train_pa[,myRespName])
> test_pa <- read.csv(system.file("external/species/Test_PA.csv",
> package="biomod2"))
> myRespEval <- 'PTM'
> myEvalpa <- as.numeric(test_pa[,myRespName])
> train_env <-read.csv(system.file("external/bioclim/current/train_env.csv",
> package="biomod2"))
> myExpl <- as.data.frame(train_env)
> test_env <-read.csv(system.file("external/bioclim/current/test_env.csv",
> package="biomod2"))
> myEvalenv <- as.data.frame(test_env)
> myBiomodData <- BIOMOD_FormatingData(resp.var=myResp, expl.var=myExpl,
> resp.name=myRespName, eval.resp.var=myEvalpa, eval.expl.var=myEvalenv)
>
> > No pseudo absences selection !Error in validObject(.Object) :
>   invalid class “BIOMOD.formated.data” object: invalid object for slot
> "coord" in class "BIOMOD.formated.data": got class "NULL", should be or
> extend class "data.frame"
>
>


More information about the Biomod-commits mailing list