[Biomod-commits] Unable to run Projection.raster
Nagore García
ngmedina at gmail.com
Tue Dec 7 12:39:20 CET 2010
Hi all,
This is my first run in BIOMOD, and I'm afraid I'm having troubles with
Projection.raster. Here I attach de script I used, function Models() runs
nicely, but then I have an error message when trying to run
Projection.raster. Anybody has an idea why I get this error message?
ovit
Error en as.numeric(g) :
cannot coerce type 'S4' to vector of type 'double'
sdmdata<-read.csv("sdmdata.csv")
head(sdmdata)
idw x y ibe_biof1 ibe_biof10 ibe_biof11 ibe_biof12
ibe_biof13
1 1 -2.238898 37.92525 114 203 39 561
72
2 2 -1.704232 37.92057 113 199 40 568
73
3 3 -2.064232 38.23942 114 201 39 551
71
4 4 -3.764231 40.95501 100 185 26 532
62
5 5 -2.638544 42.54070 123 195 55 611
64
6 6 -3.764483 40.95520 100 185 26 532
62
ibe_biof14 ibe_biof15 ibe_biof16 ibe_biof17 ibe_biof18 ibe_biof19
ibe_biof2
1 16 34 190 71 72 152
118
2 19 31 188 80 81 143
116
3 17 33 186 75 75 140
119
4 18 28 162 78 86 138
104
5 32 19 178 122 122 160
97
6 18 28 162 78 86 138
104
ibe_biof3 ibe_biof4 ibe_biof5 ibe_biof6 ibe_biof7 ibe_biof8 ibe_biof9
1 38 6472 296 -13 309 91 202
2 38 6255 286 -13 299 89 197
3 38 6425 294 -15 309 92 201
4 36 6286 266 -17 283 60 184
5 38 5484 265 15 250 90 195
6 36 6286 266 -17 283 60 184
ibe_elevf pv
1 1317 1
2 1408 1
3 1370 1
4 1244 1
5 503 1
6 1244 1
Initial.State(Response = sdmdata[,24], Explanatory =
sdmdata[,c(23,4,14,17)],IndependentResponse = NULL,sp.name="ovit")
Models(GLM = F, TypeGLM = "poly", Test = "AIC", GBM = F, No.trees = 2000,
GAM = T, Spline = 3, CTA = F, CV.tree = 50, ANN = F, CV.ann = 2, SRE = F,
quant=0.025, FDA = F,MARS = F, RF = F, NbRunEval = 4, DataSplit = 80,
Yweights=NULL, Roc = T, Optimized.Threshold.Roc = T, Kappa = T, TSS=T,
KeepPredIndependent = F, VarImport=F, NbRepPA=0)
Biomod.Manual()
CurrentPred(GLM=T, GBM=T, GAM=T, CTA=T, ANN=T, SRE=T, MARS=F, RF=T,BinRoc=T,
BinKappa=T, BinTSS=T, FiltKappa=T)
files <- list.files("\\encuadre iberico",pattern='asc', full.names=TRUE )
pred.1 <- stack(files[c(1,14,11,20)])
Projection.raster(RasterProj = pred.1, Proj.name='Pred.ovit1', GLM = T, GBM
= T, GAM = T,CTA = T, ANN = T, SRE = T, MARS = T, RF = T,BinRoc = T,
BinKappa = T, BinTSS = T, FiltRoc = T, FiltKappa = T, FiltTSS =
T,repetition.model=T)
--
Nagore García Medina. ngmedina at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20101207/4888b656/attachment.htm>
More information about the Biomod-commits
mailing list