<br><br><div><span class="gmail_quote">On 28/02/2008, <b class="gmail_sendername">Roger Bivand</b> &lt;<a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 27 Feb 2008, Rainer M Krug wrote:<br> <br> &gt; Hi<br> &gt;<br> &gt; Sorry for crossposting, but I think this can be of interest for GRASS and R<br> &gt; users.<br> <br> <br>Yes, please avoid cross-posting - the discussion ends up on many different<br>
 lists and threading can break down if the threading implementation in mail<br> clients and archives doesn&#39;t like cross-posting.</blockquote><div><br>OK - I&#39;ll avoid it in the future and continue this thread on grass-dev. <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> The only complete thread I have found is on Nabble at:<br> <br> <a href="http://www.nabble.com/Plan-to-build-Package-to-use-GRASS-from-R-tt15712877.html#a15712877">http://www.nabble.com/Plan-to-build-Package-to-use-GRASS-from-R-tt15712877.html#a15712877</a><br>
 <br> for the grass-dev list.<br> <br> In summary, the problems are mostly those of appropriately quoting shell<br> commands through system() across platforms. Those interested should follow<br> the discussion on grass-dev.<br>
 <br> The correct lists could be either here, or the grass-stats list; could</blockquote><div><br>I think I will leave it at the grass-dev list, altohough it concerns
grass and R - it is more a devel issue then for the grass-stats list.&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Rainer post a summary to both (hopefully in-thread) on conclusion?</blockquote>
<div><br>OK - I will do so as soon some ideas and further palns emerge.<br><br>If I have a working solution, would it be possible to include it into the spgrass6 package?<br><br>Thanks<br><br>Rainer<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 Roger<br> <br><br> &gt;<br> &gt; I am planning to write a package to make the use of GRASS from R easier. The<br> &gt; idea is to wrap the system call to execute the GRASS command into an R<br> &gt; command of the same name.<br>
 &gt; e.g:<br> &gt; r.to.vect &lt;- function(..., intern=TRUE, ignore.stderr=FALSE)<br> &gt;&nbsp;&nbsp;{<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;comm &lt;- paste( &quot;r.to.vect &quot;, ..., sep=&quot;&quot; )<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;print(comm)<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;system( comm, intern=intern, ignore.stderr=ignore.stderr )<br>
 &gt;&nbsp;&nbsp;}<br> &gt;<br> &gt; My questions are:<br> &gt;<br> &gt; 1) Is this a good way of doing it, or is giving a named list to the function<br> &gt; more usefull?<br> &gt; 2) Is there a way to obtain easily all commands from GRASS and the<br>
 &gt; parameters possible and required?<br> &gt;<br> &gt; Any ideas and comments welcome,<br> &gt;<br> &gt; Rainer<br> &gt;<br> &gt;<br> &gt;<br> <br> --<br> <br>Roger Bivand<br> Economic Geography Section, Department of Economics, Norwegian School of<br>
 Economics and Business Administration, Helleveien 30, N-5045 Bergen,<br> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43<br> e-mail: <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a><br> <br> </blockquote>
</div><br><br clear="all"><br>-- <br><br>-- <br>Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT)<br><br>Plant Conservation Unit Department of Botany<br>University of Cape Town<br>Rondebosch 7701<br>South Africa