[Biomod-commits] Error in model.frame.default - "invalid type (list) for variable" - using BIOMOD
Chris Hassall
chassall at connect.carleton.ca
Thu May 10 23:15:45 CEST 2012
I have exactly the same problem, both with my own data and with the
tutorial data. I have not found a solution or any previous mention of
this problem. I have used BIOMOD successfully before on the same
computer. I have BIOMOD version 1.1-7.02/r300 and R version 2.15.0 (all
up to date).
Input code:
------------------------------------------------------------------------
library(BIOMOD)
data(Sp.Env)
LatLong <- Sp.Env[,2:3]
Expl.Var <- Sp.Env[,4:10]
Resp.Var <- Sp.Env[,11:17]
Initial.State(Response = Resp.Var[,1:2], Explanatory = Expl.Var)
Models(GLM = FALSE, TypeGLM = "quad", Test = "AIC", GBM = FALSE,
No.trees = 3000, GAM = FALSE, CTA = TRUE, CV.tree = 50,
ANN = FALSE, CV.ann = 2, SRE = FALSE, quant=0.05, FDA = TRUE, MARS =
FALSE, RF = FALSE, NbRunEval = 2, DataSplit = 80,
Yweights=NULL, Roc=TRUE, Optimized.Threshold.Roc=TRUE, Kappa=TRUE,
TSS=TRUE, KeepPredIndependent = FALSE, VarImport=5,
NbRepPA=2, strategy="circles", coor=LatLong, distance=2,
nb.absences=1000)
------------------------------------------------------------------------
Output error:
------------------------------------------------------------------------
-----------------------------------
Modelling summary
-----------------------------------
Number of species modelled : 2
Sp281, Sp290
numerical variables : Var1, Var2, Var3, Var4, Var5,
Var6, Var7
number of evaluation repetitions : 2
number of pseudo-absences runs : 2
models selected : CTA, FDA
total number of model runs : 24
-----------------------------------
##### Sp281 #####
##### pseudo-absence run 1 #####
Model=Classification tree
50 Fold Cross-Validation
Error in model.frame.default(Terms, newdata, na.action = na.action, xlev
= attr(object, :
invalid type (list) for variable 'Var1'
------------------------------------------------------------------------
Any assistance would be greatly appreciated,
Chris
___________________________________________________
*Dr Christopher Hassall*
Ontario MRI Postdoctoral Fellow
Carleton University
Ottawa, ON,
K1S 5B6 Canada
Tel: 00 1 (613) 520 2600 (ext. 3866)
Fax: 00 1 (613) 520 3539
http://www.christopherhassall.com/
___________________________________________________
On 10/05/2012 4:57 PM, Oscar Javier Ramos wrote:
> Hi,
>
> I'm beginning with BIOMOD.
>
> Just running the example on the "BIOMOD: Tutorial (February 13, 2012)"
> => data(Sp.Env)",
>
> I got the following error:
>
> ------------------------------
> -----
> Modelling summary
> -----------------------------------
> Number of species modelled : 2
> Sp281, Sp290
>
> numerical variables : Var1, Var2
>
>
> number of evaluation repetitions : 3
> number of pseudo-absences runs : 2
> models selected : ANN, CTA, GAM, GBM, GLM, MARS,
> FDA, RF, SRE
> total number of model runs : 144
> -----------------------------------
>
>
> ##### Sp281 #####
> ##### pseudo-absence run 1 #####
> Model=Artificial Neural Network
> 2 Fold Cross Validation + 3 Repetitions
> Calibration and evaluation phase: Nb of cross-validations: 3
>
> Error in model.frame.default(formula = eval(parse(text =
> paste("Target[Samp$calibration]", :
> invalid type (list) for variable 'Var1'
>
>
> Could anyone help me to overcome this problem?
>
>
> Thanks,
>
> Oscar
>
>
> _______________________________________________
> 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
>
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20120510/68c0ac7d/attachment.html>
More information about the Biomod-commits
mailing list