<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dear Amandine,</div><div><br></div><div>This is difficult to answer with the former calls (Initial.States and Models).</div><div><br></div><div>Using the BIOMOD data, it works quite well:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #0f2195">data(</span>Sp.Env<span style="color: #0f2195">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #0f2195">data(</span>CoorXY<span style="color: #0f2195">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(169, 65, 203); ">#use fix(Sp.Env) to visualise the dataset</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(169, 65, 203); ">#This command is necessary for the run of BIOMOD as a new dataframe is produced for the Models function</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #0f2195">Initial.State(</span>Response<span style="color: #0f2195">=</span>Sp.Env<span style="color: #0f2195">[,</span><span style="color: #2b6fb8">12</span><span style="color: #0f2195">:</span><span style="color: #2b6fb8">13</span><span style="color: #0f2195">],</span><span style="color: #000000"> </span>Explanatory<span style="color: #0f2195">=</span>Sp.Env<span style="color: #0f2195">[,</span><span style="color: #2b6fb8">4</span><span style="color: #0f2195">:</span><span style="color: #2b6fb8">10</span><span style="color: #0f2195">],</span><span style="color: #000000">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); ">IndependentResponse<span style="color: #0f2195">=</span><span style="color: #db224a">NULL</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>IndependentExplanatory<span style="color: #0f2195">=</span><span style="color: #db224a">NULL</span><span style="color: #0f2195">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #0f2195">Models(</span>GLM<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">F</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>TypeGLM<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #b6110d">"quad"</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>Test<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #b6110d">"AIC"</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>GBM<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">FALSE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>No.trees<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #2b6fb8">3000</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>GAM<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">FALSE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>CTA<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>CV.tree<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #2b6fb8">50</span><span style="color: #0f2195">,</span><span style="color: #000000">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #000000">&nbsp;&nbsp; </span>ANN<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">FALSE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>CV.ann<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #2b6fb8">2</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>SRE<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">FALSE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>quant<span style="color: #0f2195">=</span><span style="color: #2b6fb8">0.05</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>FDA<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>MARS<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>RF<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>NbRunEval<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #2b6fb8">2</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>DataSplit<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #2b6fb8">80</span><span style="color: #0f2195">,</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #000000">&nbsp;&nbsp; </span>Yweights<span style="color: #0f2195">=</span><span style="color: #db224a">NULL</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>Roc<span style="color: #0f2195">=</span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>Optimized.Threshold.Roc<span style="color: #0f2195">=</span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>Kappa<span style="color: #0f2195">=</span><span style="color: #db224a">F</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>TSS<span style="color: #0f2195">=</span><span style="color: #db224a">TRUE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>KeepPredIndependent<span style="color: #000000"> </span><span style="color: #0f2195">=</span><span style="color: #000000"> </span><span style="color: #db224a">FALSE</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>VarImport<span style="color: #0f2195">=</span><span style="color: #2b6fb8">5</span><span style="color: #0f2195">,</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #000000">&nbsp;&nbsp; </span>NbRepPA<span style="color: #0f2195">=</span><span style="color: #2b6fb8">2</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>strategy<span style="color: #0f2195">=</span><span style="color: #b6110d">"random"</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>coor<span style="color: #0f2195">=</span>CoorXY<span style="color: #0f2195">,</span><span style="color: #000000"> </span>distance<span style="color: #0f2195">=</span><span style="color: #2b6fb8">2</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span>nb.absences<span style="color: #0f2195">=</span><span style="color: #2b6fb8">500</span><span style="color: #0f2195">)</span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; min-height: 16.0px">&nbsp; &nbsp;<br class="webkit-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; min-height: 16.0px">&nbsp; &nbsp;<br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; font: normal normal normal 13px/normal Courier; color: rgb(0, 113, 40); "><span style="color: #0f2195">multiple.plot(</span>Pred_Sp290<span style="color: #0f2195">[,</span><span style="color: #000000"> </span><span style="color: #2b6fb8">1</span><span style="color: #0f2195">:</span><span style="color: #2b6fb8">9</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span><span style="color: #2b6fb8">1</span><span style="color: #0f2195">,</span><span style="color: #000000"> </span><span style="color: #2b6fb8">1</span><span style="color: #0f2195">],</span><span style="color: #000000"> </span>CoorXY<span style="color: #0f2195">[</span>Biomod.PA.sample<span style="color: #0f2195">$</span>Sp290<span style="color: #0f2195">$</span>PA1<span style="color: #0f2195">,])</span><span style="color: #000000">&nbsp; &nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; font: normal normal normal 13px/normal Courier; min-height: 16px; ">Cheers,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; font: normal normal normal 13px/normal Courier; min-height: 16px; ">Wilfried</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><br></div><div><br></div><div><br></div><br><div><div>Le 7 déc. 2011 à 17:45, Amandine Cornille a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">
  

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <meta http-equiv="Content-Type" content="text/html;
      charset=ISO-8859-1">
    <span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 17px; white-space: pre-wrap; ">
        <pre tabindex="0" class="GD40030CLR" style="font-family: Monospace; font-size: 10pt !important; outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 1.3; "><span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">Hi all, 

I am using Biomod package for niche modelling. 

I did the initial state and lauched the model. After I tried to plot the predictions on a map, but I have this error message : 


&gt; </span><span class="GD40030CCR ace_keyword" style="color: blue; ">multiple.plot(Pred_sylvestris[,1:9,1,1],coordXY[Biomod.PA.sample$MyDataPA2$PA1,])
</span><span class="GD40030CGR">Erreur dans multiple.plot(Pred_sylvestris[, 1:9, 1, 1], coordXY[Biomod.PA.sample$MyDataPA2$PA1,  : 
  Uncorrect mapping coordinates : <u>coor and Data are not of the same length</u>

When I checked  files I used, indeed coor and data are not one the same length... 
</span>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Monospace; font-size: 13px; line-height: 17px; text-align: -webkit-left; white-space: pre-wrap; "><pre tabindex="0" class="GD40030CLR" style="font-family: Monospace; font-size: 10pt !important; outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-
style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 1.3; "><span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">&gt; </span><span class="GD40030CCR ace_keyword" style="color: blue; ">length(coordXY)
</span>[1] 2
<span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">&gt; </span><span class="GD40030CCR ace_keyword" style="color: blue; ">length(Biomod.PA.sample)
</span>[1] 1
<span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; "></span><span class="GD40030CGR">
</span><span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">&gt; </span><span class="GD40030CCR ace_keyword" style="color: blue; ">head(coordXY)
</span>      X     Y
1 16.12 47.88
2 16.11 47.89
6 16.22 48.39
7 17.19 44.00
8  4.33 50.94
9 15.57 44.97
<span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">&gt; </span><span class="GD40030CCR ace_keyword" style="color: blue; ">head(Biomod.PA.sample)
</span>$sylvestris
$sylvestris$PA1
   [1]     1     2     3     4     5     6     7     8     9    10    11    12    13    14    15    16
  [17]    17    18    19    20    21    22    23    24    25    26    27    28    29    30    31    32
  [33]    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48
  [49]    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64
  [65]    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80
  [81]    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96</pre></span></span>
I deleted all duplicate XY coor in the case of it was that by using : MyData3&lt;-MyData[!duplicated(MyData[,c(1,2)]),]

But After re ran initial.state and models, It didn't work again giving the same error message ....

May you help me please ? 

Thanks a lot for your help, 

Amandine 
</pre>
      </span>
  </div>

_______________________________________________<br>Biomod-commits mailing list<br><a href="mailto:Biomod-commits@lists.r-forge.r-project.org">Biomod-commits@lists.r-forge.r-project.org</a><br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits</blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>--------------------------</div><div>Dr. Wilfried Thuiller</div><div>Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><div>Université Joseph Fourier</div><div>BP53, 38041 Grenoble cedex 9, France</div><div>tel: +33 (0)4 76 51 44 97</div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email:&nbsp;<a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br>Personal website:&nbsp;<a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Team website:&nbsp;<a href="http://www-leca.ujf-grenoble.fr/equipes/emabio.htm">http://www-leca.ujf-grenoble.fr/equipes/emabio.htm</a><br><br>FP6 European MACIS project:&nbsp;<a href="http://www.macis-project.net/">http://www.macis-project.net</a><br>FP6 European EcoChange project:&nbsp;<a href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><div><br></div></span></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></body></html>