<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I just fix the bug you mentioned in Ensemble.Forecasting.raster.<br>
<br>
Cheers,<br>
<br>
Damien <br>
<br>
<br>
On 30/05/2012 09:42, Visser, V, Dr <a class="moz-txt-link-rfc2396E" href="mailto:vernonvisser@sun.ac.za"><vernonvisser@sun.ac.za></a>
wrote:
<blockquote
cite="mid:63F358F0ED08BD40AADA9D735420310F033163017A60@STBEVS08.stb.sun.ac.za"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Lucida Console";
panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-fareast-language:EN-ZA;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">I am trying to use the
Ensemble.Forecasting.raster function, but get the following
error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Lucida
Console";color:black;mso-fareast-language:EN-ZA">Error
in out[["thresholds"]][, (j - 1) * nbrep + k] <-
c(ths[[1]][length(ths[[1]])], : <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Lucida
Console";color:black;mso-fareast-language:EN-ZA"> number
of items to replace is not a multiple of replacement length<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I used a cropped raster stack
(predictors_sub) to do the model projections (with
Projection.Raster). My code looks like the following:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Models(GAM = T,Spline = 4,<o:p></o:p></p>
<p class="MsoNormal"> NbRunEval = 4,<o:p></o:p></p>
<p class="MsoNormal"> DataSplit = 70,<o:p></o:p></p>
<p class="MsoNormal"> NbRepPA=2,<o:p></o:p></p>
<p class="MsoNormal"> strategy="random",<o:p></o:p></p>
<p class="MsoNormal"> coor=alldata2[,12:13],<o:p></o:p></p>
<p class="MsoNormal"> nb.absences=10000,<o:p></o:p></p>
<p class="MsoNormal"> Roc = T,<o:p></o:p></p>
<p class="MsoNormal"> VarImport=T<o:p></o:p></p>
<p class="MsoNormal"> )<o:p></o:p></p>
<p class="MsoNormal">Projection.raster(RasterProj=predictors_sub,
GAM=T, Proj.name="Proj.clunum")<o:p></o:p></p>
<p class="MsoNormal">Ensemble.Forecasting.raster(Proj.name="Proj.clunum",GAM=T,
weight.method='Roc')<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried using traceback to find the error,
but all it says is the following:<o:p></o:p></p>
<pre><span style="font-family:"Lucida Console";color:black">1: Ensemble.Forecasting.raster(Proj.name = "Proj.clunum", GAM = T, <o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black"> weight.method = "Roc")<o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any help would be most appreciated.<o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif";color:gray;mso-fareast-language:EN-ZA">Vernon
Visser<br>
Post-doctoral Research Associate<br>
Centre of Excellence for Invasion Biology<br>
Department of Botany and Zoology<br>
Natural Sciences Building<br>
Private Bag X1<br>
University of Stellenbosch<br>
Matieland <br>
7602<br>
South Africa<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Arial","sans-serif";mso-fareast-language:EN-ZA"><a
moz-do-not-send="true"
href="https://sites.google.com/site/vernonvisserpostdoc/"><span
style="color:blue">https://sites.google.com/site/vernonvisserpostdoc/</span></a></span><span
style="mso-fareast-language:EN-ZA"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Biomod-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Biomod-commits@lists.r-forge.r-project.org">Biomod-commits@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits</a></pre>
</blockquote>
<br>
</body>
</html>