[Biomod-commits] Error with Ensemble.Forecasting.raster: number of items to replace...

Visser, V, Dr <vernonvisser@sun.ac.za> vernonvisser at sun.ac.za
Wed May 30 09:42:04 CEST 2012


I am trying to use the Ensemble.Forecasting.raster function, but get the following error:

Error in out[["thresholds"]][, (j - 1) * nbrep + k] <- c(ths[[1]][length(ths[[1]])],  :
  number of items to replace is not a multiple of replacement length

I used a cropped raster stack (predictors_sub) to do the model projections (with Projection.Raster). My code looks like the following:

Models(GAM = T,Spline = 4,
         NbRunEval = 4,
         DataSplit = 70,
         NbRepPA=2,
         strategy="random",
         coor=alldata2[,12:13],
         nb.absences=10000,
         Roc = T,
         VarImport=T
         )
Projection.raster(RasterProj=predictors_sub, GAM=T, Proj.name="Proj.clunum")
Ensemble.Forecasting.raster(Proj.name="Proj.clunum",GAM=T, weight.method='Roc')

I tried using traceback to find the error, but all it says is the following:

1: Ensemble.Forecasting.raster(Proj.name = "Proj.clunum", GAM = T,

       weight.method = "Roc")

Any help would be most appreciated.
Thanks,


Vernon Visser
Post-doctoral Research Associate
Centre of Excellence for Invasion Biology
Department of Botany and Zoology
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland
7602
South Africa
https://sites.google.com/site/vernonvisserpostdoc/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20120530/9fe2d9de/attachment.html>


More information about the Biomod-commits mailing list