<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Because you need to use the raster function to load the raster and not the readAsciiGrid.&nbsp;</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) &nbsp;:<br> &nbsp;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 href="mailto:mspinola@una.ac.cr">mspinola@una.ac.cr</a><br>mspinola10@gmail.com<br>Teléfono: (506) 2277-3598<br>Fax: (506) 2237-7036<br><br>_______________________________________________<br>Biomod-commits mailing list<br>Biomod-commits@lists.r-forge.r-project.org<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits<br></div></blockquote></div><br><div>
<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>Home page:&nbsp;<a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Website:&nbsp;<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:&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><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></body></html>