<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Semra,<br>
<br>
Your can work with rasters in meters or whatever units you want if
your resp.xy are expressed same units.<br>
<br>
I made some test and disk PA selection seems to work well on my
computer.. <br>
<br>
Are you sure to have correctly extract your species occurances?<br>
Did you keep only the presences?<br>
Could you check your <i>myResp object summary?</i><br>
<br>
If you want, you can send me your raster objects (in private
mail), I will test if I get the same issue.<br>
<br>
All the best,<br>
<br>
Damien.<br>
<br>
<br>
On 09/10/2012 09:13, semra yalcin wrote:<br>
</div>
<blockquote
cite="mid:CABX-FmqG6QJKTYqqX6eifobEF5+HgxTeE-+KCnLPq6p4A+f-Ww@mail.gmail.com"
type="cite">
<div>
<div>Dear Damien,</div>
<div><br>
</div>
<div>I would like to generate PA by using disk strategy in
Biomod2. But I got error while doing this. When I select
PA.dist.min = 0, it can select PAs. On the other hand, when
selecting a value bigger than zero for PA.dist.min, it shows
an error <i>below</i>. My layers' linear units are meter,
can it be a problem? </div>
<div><br>
</div>
<div>Thank you in advance,</div>
<div><br>
</div>
<div>Semra</div>
</div>
<div><br>
</div>
<div>------------------------------------------------------</div>
<div><u>Used codes (similar to default code) :</u></div>
<div>
<br>
</div>
<i>myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,<br>
expl.var = datacurr,<br>
resp.xy = myRespXY,<br>
<a moz-do-not-send="true" href="http://resp.name">resp.name</a>
= myRespName,<br>
PA.nb.rep = 5,<br>
PA.nb.absences = 10000,</i><br>
<i>PA.strategy = 'disk',</i><br>
<i>
PA.dist.min = 20000) <u> </u></i><u># 20 km; there are enough
pixels for selecting 10000 PA with this rule</u>
<div><i><br>
</i></div>
<div>
<div>------------------------------------------------------</div>
</div>
<div><br>
</div>
<div>Error <span
style="font-family:Arial,sans-serif;font-size:14px;background-color:rgb(252,252,252)">message</span>: <br>
<br>
<i> |
| | 0%Error in
setValues(r, values = callGeneric(getValues(e1), e2)) : <br>
length(values) is not equal to ncell(x), or to 1<br>
Calls: BIOMOD_FormatingData ... disk.pseudo.abs.selection
-> .local -> > -> > -> setValues ->
setValues</i><br>
<br>
<div>------------------------------------------------------</div>
<div><br>
</div>
<div>
<u>Layers:</u></div>
<div><br>
</div>
<i>> datacurr<br>
class : RasterStack <br>
dimensions : 710, 1675, 1189250, 7 (nrow, ncol, ncell,
nlayers)<br>
resolution : 1000, 1000 (x, y)<br>
extent : -125022.9, 1549977, 3967607, 4677607 (xmin,
xmax, ymin, ymax)<br>
coord. ref. : +proj=utm +zone=36 +ellps=WGS84
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <br>
names : aspect, bio04, bio05, bio06, bio12, bio14,
wetness <br>
min values : -1.00, 5240.00, 93.00, -250.00, 252.00, 0.00,
0.52 <br>
max values : 360, 10293, 415, 85, 2184, 84, 22 <br>
<br>
<u>> myResp.ras</u><br>
class : RasterLayer <br>
dimensions : 710, 1675, 1189250 (nrow, ncol, ncell)<br>
resolution : 1000, 1000 (x, y)<br>
extent : -125022.9, 1549977, 3967607, 4677607 (xmin,
xmax, ymin, ymax)<br>
coord. ref. : +proj=utm +zone=36 +ellps=WGS84
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <br>
data source : /home/semra/biomod/speciesdata/kn500_.img <br>
names : kn500_ <br>
values : 1, 1 (min, max)<br>
Raster Attribute Table<br>
fields : ID COUNT BinValues Value<br>
min : 0 500 1 1<br>
max : 0 500 1 1</i><br>
</div>
<div><i><br>
</i></div>
<div>
<div>------------------------------------------------------</div>
</div>
<div><br>
</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>