<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Few tips:</div><div><br></div><div>1- Make sure you really load the raster. You might need to put the complete path to the raster in the raster call. </div><div><div bgcolor="#ffffff" text="#000000"><div>for instance, plot the raster.</div><div><br></div><div><div bgcolor="#ffffff" text="#000000"><div>muestra = raster("cld6190_ann.asc")</div><div>plot(muestra)</div><div><br></div><div>2- Put your data in the C folder. There are free space in your path and I gather spanish signs.</div><div>Make sure to put the data at the root with no space in the same and without any particular signs. </div><div><br></div><div><br></div></div></div><div><br></div></div></div><div><div>Le 9 sept. 10 à 13:21, Manuel Spínola a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div bgcolor="#ffffff" text="#000000"> Thank you very much Wilfried,<br> <br> However,<br> <br> df = xyValues(muestra, loca)<br> Error en .local(.Object, ...) : <br> `C:/Documents and Settings/Manuel/Mis documentos/Manolo/Proyectos en R/Análisis Espacial/cld6190_ann.asc' does not exist in the file system,<br> and is not recognised as a supported dataset name.<br> <br> <br> Best,<br> <br> Manuel<br> <br> <br> On 08/09/2010 10:53 p.m., Wilfried Thuiller wrote: <blockquote cite="mid:7D414DB3-296E-40B4-89FC-0FBE2E2E2C15@ujf-grenoble.fr" type="cite"> <div>Because you need to use the raster function to load the raster and not the readAsciiGrid. </div> <div><br> </div> <div>muestra = raster("cld6190_ann.asc")<br> <br> loc = read.csv(file="bradypus.csv",head=TRUE,sep=",")<br> loca = loc[,2:3]<br> <br> df = xyValues(muestra, loca)</div> <div><br> </div> <div>The xyValues function works with raster object only</div> <div><br> </div> <div><br> </div> <div><br> </div> <br> <div> <div>Le 9 sept. 2010 à 05:13, Manuel Spínola a écrit :</div> <br class="Apple-interchange-newline"> <blockquote type="cite"> <div> Dear list members,<br> <br> I am trying to use xyValues to extract values from a raster file:<br> <br> muestra = readAsciiGrid("cld6190_ann.asc")<br> <br> loc = read.csv(file="bradypus.csv",head=TRUE,sep=",")<br> loca = loc[,2:3]<br> <br> df = xyValues(muestra, loca)<br> Error en function (classes, fdef, mtable) :<br> unable to find an inherited method for function "xyValues", for signature "SpatialGridDataFrame", "data.frame"<br> <br> Why did I get the error message?<br> <br> Best,<br> <br> Manuel<br> <br> -- <br> Manuel Spínola, Ph.D.<br> Instituto Internacional en Conservación y Manejo de Vida Silvestre<br> Universidad Nacional<br> Apartado 1350-3000<br> Heredia<br> COSTA RICA<br> <a moz-do-not-send="true" href="mailto:mspinola@una.ac.cr">mspinola@una.ac.cr</a><br> <a class="moz-txt-link-abbreviated" href="mailto:mspinola10@gmail.com">mspinola10@gmail.com</a><br> Teléfono: (506) 2277-3598<br> Fax: (506) 2237-7036<br> <br> _______________________________________________<br> Biomod-commits mailing list<br> <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><br> <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><br> </div> </blockquote> </div> <br> <div> <div style="word-wrap: break-word;"> <div style="word-wrap: break-word;"> <div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">--------------------------</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">Dr. Wilfried Thuiller</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">Université Joseph Fourier</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">BP53, 38041 Grenoble cedex 9, France</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">tel: +33 (0)4 76 51 44 97</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">fax: +33 (0)4 76 51 42 79</div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; "><br> </div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; ">Email: <a moz-do-not-send="true" href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br> Home page: <a moz-do-not-send="true" href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br> Website: <a moz-do-not-send="true" href="http://www-leca.ujf-grenoble.fr/equipes/tde.htm">http://www-leca.ujf-grenoble.fr/equipes/tde.htm</a><br> <br> FP6 European MACIS project: <a moz-do-not-send="true" href="http://www.macis-project.net/">http://www.macis-project.net</a><br> FP6 European EcoChange project: <a moz-do-not-send="true" href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><span class="Apple-style-span" style="font-size: 12px; "> </span><div style="font-size: 12px; "><br> </div><span class="Apple-style-span" style="font-size: 12px; "> </span></div> </div> <br class="Apple-interchange-newline"> </div> <br class="Apple-interchange-newline"> <br class="Apple-interchange-newline"> </div> <br> </blockquote> <br> <br> <pre class="moz-signature" cols="72">--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
<a class="moz-txt-link-abbreviated" href="mailto:mspinola@una.ac.cr">mspinola@una.ac.cr</a>
<a class="moz-txt-link-abbreviated" href="mailto:mspinola10@gmail.com">mspinola10@gmail.com</a>
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036</pre> </div> </blockquote></div><br><div> <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-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; "><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: 12px; 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>-------------------------</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 (<span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; -webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; ">0)4 76 51 44 97</span></div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email: <a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br>Home page: <a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Website: <a href="http://www-leca.ujf-grenoble.fr/equipes/tde.htm">http://www-leca.ujf-grenoble.fr/equipes/tde.htm</a><br><br>FP6 European MACIS project: <a href="http://www.macis-project.net/">http://www.macis-project.net</a><br>FP6 European EcoChange project: <a href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><div><br></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>