<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" dir="auto">
Please also see </div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div dir="auto"><a rel="noreferrer noopener" href="https://github.com/rsbivand/rgrass/issues/64">https://github.com/rsbivand/rgrass/issues/64</a> and perhaps give more context - is this the public github repo <br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<a rel="noreferrer noopener" href="https://github.com/NINAnor/oneimpact/">https://github.com/NINAnor/oneimpact/</a> ?<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
Roger</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto">---</div>
<div dir="auto">Roger Bivand</div>
<div dir="auto">Emeritus Professor</div>
<div dir="auto">Department of Economics</div>
<div dir="auto">Norwegian School of Economics, Bergen, Norway</div>
</div>
<div id="mail-editor-reference-message-container" dir="auto"><br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" style="font-size: 11pt;"><strong>Fra:</strong> grass-stats <grass-stats-bounces@lists.osgeo.org> på vegne av Bernardo Santos via grass-stats <grass-stats@lists.osgeo.org><br>
<strong>Sendt:</strong> fredag 26. august 2022, 12:56<br>
<strong>Til:</strong> grass-stats@lists.osgeo.org <grass-stats@lists.osgeo.org>; GRASS User List <grass-user@lists.osgeo.org><br>
<strong>Emne:</strong> [GRASS-stats] Running r-grass examples when building a R package<br>
</div>
<br>
<div class="yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; font-size:16px">
<div dir="ltr" data-setdir="false">Dear all,</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">I am building a R package and some of the functions use rgrass to connect to a GRASS project and run thingfs within GRASS.</div>
<div dir="ltr" data-setdir="false">I have now set up a webpage for the package using pkgdown in integrated to Github actions. This means when I push new commits all the examples of R functions are run again and the webpage is updated with the results of the
 examples. Here is the webpage: <a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fninanor.github.io%2Foneimpact%2F&data=05%7C01%7Croger.bivand%40nhh.no%7C9ee806160e144928a19908da8751a4d1%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C637971081981258278%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DGuKqYQDHFgwT3qY%2BjzglZF1mboRdv2fx7ETXdmYRJ0%3D&reserved=0" originalsrc="https://ninanor.github.io/oneimpact/" shash="RRcSuEIrTaNBm2QPTTJRk9qXSrKESBZs2Xr8mDWi/Q6bBnsTgF+zs4Nbd1y1e46gWoVLauUMuAu4u3x3GGjO8nSP2rXHxwFudsegS584sVhfpjQZE0/4/kXcesqAy7K8nRGjSVx6bK/IAq5wKjFV4IipGk6rAPbICN59RNK3/zQ=" rel="nofollow" target="_blank">https://ninanor.github.io/oneimpact/</a></div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="auto" data-setdir="false">All works fine, except the functions calling GRASS. When I run the examples form my local computer everything works, but in the Github actions it does not run, apparently because the command</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><span>
<pre class="ydpa6a6511esourceCode ydpa6a6511er" style="font-size:0.875em; direction:ltr; unicode-bidi:bidi-override; margin-top:0px; color:rgb(0,0,0); background-color:rgb(241,243,245); border:1px solid rgb(222,226,230)"><code style="font-size:inherit; direction:ltr; unicode-bidi:bidi-override; color:rgb(0,59,79); background:transparent; padding:0px"><span class="ydpa6a6511er-in"><span><span class="ydpa6a6511efu" style="color:rgb(71,88,171)"><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Frdrr.io%2Fr%2Fbase%2Fsystem.html&data=05%7C01%7Croger.bivand%40nhh.no%7C9ee806160e144928a19908da8751a4d1%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C637971081981258278%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PWx9f7SSQY6EQn2nPNsCFAdIjT3hp3T6Kk7S9%2BAKnDs%3D&reserved=0" originalsrc="https://rdrr.io/r/base/system.html" shash="yBkaBOHqbwQIaLKGBxTuyTG3OCsWRNnwBZFausKWlngMm3+gSJCjoww7HN6dDX5onfNbuukQ96ogMzXnXT+dp2gcrA4JQvudoVIfRxuzo7eWtp5LRgrcWIsJ2zDquGpSbrkGYbULVkcoveGqjV+QFbN5EMDzUsi1k+MIiNSSOzg=" class="ydpa6a6511eexternal-link" rel="nofollow" target="_blank" style="color:inherit; text-decoration-line:underline; text-decoration-color:rgb(108,117,125)">system</a></span><span class="ydpa6a6511eop" style="color:rgb(94,94,94)">(</span><span class="ydpa6a6511est" style="color:rgb(32,121,77)">"grass78 --config path"</span>, intern <span class="ydpa6a6511eop" style="color:rgb(94,94,94)">=</span> <span class="ydpa6a6511ecn" style="color:rgb(143,89,2)">T</span><span class="ydpa6a6511eop" style="color:rgb(94,94,94)">)</span></span></span></code></pre>
</span>to find the GRASS folder and use within rgrass::initGRASS does not work, so the connection between R and GRASS do not exist.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">Does someone in the group has experience with that and could help with hints to solve it?</div>
<div dir="ltr" data-setdir="false">Is there a recommended way to make sure Github actions know where GRASS is and use it?</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">Best</div>
<div dir="ltr" data-setdir="false">Bernardo</div>
</div>
<br>
</div>
</body>
</html>