[Biomod-commits] Issues arising from using the Projection.raster function
Anne Overgaard
anne.overgaard at biology.au.dk
Thu Jul 29 15:06:26 CEST 2010
Dear BIOMOD-group,
I have recently upgraded to the newest version of R and BIOMOD and currently
trying to project SRE models onto a raster stack using the Projection.raster
function. However, I continuously run into this error message: *Error in TF
+ TFmin : non-numeric argument to binary operator. *Can anyone tell me what
I am doing wrong? Thanking you in advance.
The following is a part of my script:
*Initial.State(Response=ENVSP[,c(35,37,42,43,48,53,58,59,64,65,66,68,69,70,71,73,76,78,80,82,84,85,87,90,93,95,96)],
Explanatory=ENVSP[,c(4:8, 19:23)], IndependentResponse=NULL,
IndependentExplanatory=NULL)*
**
*Models(SRE = T, quant=0.025, NbRunEval = 2, DataSplit = 80,
Yweights=NULL, Roc=T, Optimized.Threshold.Roc=T, Kappa=T, TSS=T,
KeepPredIndependent = F, VarImport=0,
NbRepPA=0, strategy="random", coor=NULL, distance=0, nb.absences=10000)
* * ###Know not all TRUE statements are applicable for SRE, but used for
other models such as GLM, GAM etc)*
**
*library(raster)
Prin1 <- raster("rasters/Prin1")
Prin2 <- raster("rasters/Prin2")
Prin3 <- raster("rasters/Prin3")
Prin4 <- raster("rasters/Prin4")
Prin5 <- raster("rasters/Prin5")
Filter1 <- raster("rasters/Filter1")
Filter2 <- raster("rasters/Filter2")
Filter3 <- raster("rasters/Filter3")
Filter4 <- raster("rasters/Filter4")
Filter5 <- raster("rasters/Filter5")*
*rasterstack <- stack(Prin1, Prin2, Prin3, Prin4, Prin5, Filter1, Filter2,
Filter3, Filter4, Filter5)*
**
*library(rgdal)
library(maptools)
Projection.raster(rasterstack, "projectionRaster_SRE", GLM=FALSE, GBM=FALSE,
GAM=FALSE, CTA=FALSE, ANN=FALSE, SRE=TRUE, quant=0.025, FDA=FALSE,
MARS=FALSE, RF=FALSE, BinRoc=FALSE, BinKappa=FALSE, BinTSS=FALSE,
FiltRoc=FALSE, FiltKappa=FALSE, FiltTSS=FALSE, repetition.models=FALSE,
stack.out=TRUE)*
Best regards,
Anne
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20100729/ab0a6fbb/attachment.htm>
More information about the Biomod-commits
mailing list