<div dir="ltr"><div><div><div>Dear all,<br><br></div>I just joined this list and I thought I would start off by making a small contribution that may be of interest to some of you, namely a patch for the raster package (replaces raster/R/rasterFromAscii.R) which:<br><br>1. Adds support for importing GRASS ASCII raster files. <br>2. Fixes what I think is an issue with the offset parameter in the import function. Currently, if the offset is greater than the number of header lines the function silently removes data without verifying that the number of rows matches the nrows header parameter. This leads to potentially difficult to diagnose errors (e.g. getValues(x) != ncell(x)). My modified version determines the 
number of header lines and sets the correct offset (i.e. excluding any 
data lines that may have been read in).<br></div>3. Generates an easy to understand error message if the header format is not recognized.<br><br>In implementing these changes I tried to keep modifications of the original code to a minimum (see the attached patch.txt). I'm sure things could be improved, but I've used this patch for some time now and I haven't had any issues.<br><br></div><div>Cheers,<br><br>Cornel M. Pop<br>---<br>PhD Candidate,<br>Max Planck Institute for Evolutionary Anthropology,<br>Leipzig, DE<br></div></div>