[Biomod-commits] (no subject)

Damien Georges damien.georges2 at gmail.com
Wed Mar 13 10:45:11 CET 2013


Dear Kristen,

I guess you just have to give your response variables coordinates in 
"resp.xy" argument.. must be a 2 columns matrix having has many rows 
than you have observation in your response variable. If you don't have 
it, (even if it's not the best way to process)  (and don't need really  
it: don't work with raster, no disk pseudo absences selection, no plots 
of initial dataset to do...), you can give a  "false" one..
Here an example :

resp.xy = data.frame(x=rep(0,length(myResp)),y=rep(0,length(myResp)))

Best,

Damien G.

On 12/03/2013 20:22, Kristen Bouska wrote:
> 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"
>>
>>
> _______________________________________________
> Biomod-commits mailing list
> Biomod-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits



More information about the Biomod-commits mailing list