<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="auto">Enter:</div>
<div dir="auto"><br>
</div>
<div dir="auto">library(rgrass)</div>
<div dir="auto"><br>
</div>
<div dir="auto">at the R prompt in rstudio, not at the GRASS console prompt; it is an R command.</div>
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">The error message:</div>
<div dir="auto"><br>
</div>
</div>
<div dir="auto">Der Befehl "library" ist entweder falsch geschrieben oder konnte nicht gefunden werden.<br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">comes from Windows, not GRASS or R.</div>
<div dir="auto" id="ms-outlook-mobile-signature">
<div><br>
</div>
<div>---</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%">
<div id="divRplyFwdMsg" style="font-size: 11pt;"><strong>Fra:</strong> sibylle.stoeckli@gmx.ch <sibylle.stoeckli@gmx.ch><br>
<strong>Sendt:</strong> lørdag, april 20, 2024 1:10:29 p.m.<br>
<strong>Til:</strong> Roger Bivand <Roger.Bivand@nhh.no><br>
<strong>Kopi:</strong> grass-user@lists.osgeo.org <grass-user@lists.osgeo.org><br>
<strong>Emne:</strong> RE: [GRASS-user] Using RStudio in a GRASS GIS session<br>
</div>
<br>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<div class="WordSection1">
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Dear Roger</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Dear community</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">May aim is to use RStudio in a GRASS GIS session, to visualize raster and vector data: e.g. a boxplot of a species raster file or boxplot of a species raster file differentiated for different
 regions (vector file). </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Similar in </span>
</p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"><a href="https://ecodiv.earth/post/drawing-boxplots-of-raster-values/" originalsrc="https://ecodiv.earth/post/drawing-boxplots-of-raster-values/" shash="CMcfbm+34k+z/NTT2MrCjxgC2DI4YfLBb7y3IbDsoW/KJmdcgmX6EmzEx7iPtFzSeEEr29Ka/+Oe5IG7ggfYoBPgoRBLdreTP8Vn5NtbLUoPyWbd4TnG/Nc38Q8y5h02HXVWoeBsXKrbjPXli5lPHFKHaUeGinQh8Y2tPmkc4zM=">https://ecodiv.earth/post/drawing-boxplots-of-raster-values/</a></span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Because of my name with “ö” I changed the location to C:/GrassGIS: this seems to be the solution for the error when staring GRASS. No warming anymore.</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<img border="0" width="488" height="227" id="image002.png@01DA9324.1BBB33D0" src="cid:image002.png@01DA9324.1BBB33D0" style="width: 5.0833in; height: 2.3645in; max-width: 100%;"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"></span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Using the command line, I was able to produce a boxplot.</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<img border="0" width="509" height="267" id="image001.png@01DA9321.A9F85900" src="cid:image001.png@01DA9321.A9F85900" style="width: 5.302in; height: 2.7812in; max-width: 100%;"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"></span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">I am more comfortable in R, so I tried starting R inside the GRASS console (as suggested for windows) following the code here:</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"><a href="https://rsbivand.github.io/rgrass/articles/use.html" originalsrc="https://rsbivand.github.io/rgrass/articles/use.html" shash="cL/Ut5kQKgBJ14Epl8tgGqoQUdJgNB6tf7ohQ48tDKT8wnAaSduJOfRu/fe3eHv+AqEqzE39Ae2zjG7/h424wyEaRRdXA4RD0CLxgkNN/qny8npxYjQENoiZM3XocGjId1M9ZZ3RK4o/9Vfe8I9lXkBPYK3a7mKpI+mvCL+nR14=">https://rsbivand.github.io/rgrass/articles/use.html</a></span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif">However, I am still struggling around with the error</span></p>
<pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="color: rgb(38, 40, 42);">The command "library" is either misspelled or</span></pre>
<pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="color: rgb(38, 40, 42);">could not be found.</span></pre>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif">library(rgrass)                                                                
</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif">Der Befehl "library" ist entweder falsch geschrieben oder</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif">konnte nicht gefunden werden.</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif">(Sat Apr 20 12:57:24 2024) Command ended with non-zero return code 1 (0 sec)   
</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif">Kind regards</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif">Sibylle</span></p>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<span lang="DE-CH" style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> Roger Bivand <Roger.Bivand@nhh.no>
<br>
<b>Sent:</b> Saturday, April 20, 2024 8:09 AM<br>
<b>To:</b> sibylle.stoeckli@gmx.ch<br>
<b>Cc:</b> grass-user@lists.osgeo.org<br>
<b>Subject:</b> Re: [GRASS-user] Using RStudio in a GRASS GIS session</span></p>
</div>
</div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
 </p>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
First tell us exactly what you do. Do you start GRASS first (how was GRASS installed, which version?), then what? The first message suggests a failed GRASS installation. Can you use GRASS at all? Try to run any regular example on the data in your location in
 GRASS to check that GRASS works before anything else.</p>
</div>
<div id="ms-outlook-mobile-signature">
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
 </p>
</div>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
---</p>
</div>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
Roger Bivand</p>
</div>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
Emeritus Professor</p>
</div>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
Department of Economics</p>
</div>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
Norwegian School of Economics, Bergen, Norway</p>
</div>
</div>
<div id="mail-editor-reference-message-container">
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
 </p>
<div class="MsoNormal" align="center" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<strong><span style="font-size:11.0pt; font-family:"Aptos",sans-serif">Fra:</span></strong><span style="font-size:11.0pt">
<a href="mailto:sibylle.stoeckli@gmx.ch">sibylle.stoeckli@gmx.ch</a> <<a href="mailto:sibylle.stoeckli@gmx.ch">sibylle.stoeckli@gmx.ch</a>><br>
<strong><span style="font-family:"Aptos",sans-serif">Sendt:</span></strong> fredag, april 19, 2024 5:56:04 p.m.<br>
<strong><span style="font-family:"Aptos",sans-serif">Til:</span></strong> Roger Bivand <<a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>><br>
<strong><span style="font-family:"Aptos",sans-serif">Kopi:</span></strong> <a href="mailto:grass-user@lists.osgeo.org">
grass-user@lists.osgeo.org</a> <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>
<strong><span style="font-family:"Aptos",sans-serif">Emne:</span></strong> RE: [GRASS-user] Using RStudio in a GRASS GIS session</span></p>
</div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
<br>
<br>
<span style="font-size:11.0pt"></span></p>
<div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;margin-bottom:12.0pt">
<span style="font-size:11.0pt">Dear community<br>
Dear Roger<br>
<br>
I suppose it is my name<br>
Here the output from the console:<br>
<br>
C:\Users\Sibylle Stöckli><br>
C:\Users\Sibylle Stöckli><br>
ERROR: Unable to read WIND file: not enough values to unpack (expected 2,<br>
got 1)<br>
library(rgrass)<br>
Der Befehl "library" ist entweder falsch geschrieben oder<br>
konnte nicht gefunden werden.<br>
<br>
Kind regards<br>
Sibylle<br>
<br>
-----Original Message-----<br>
From: Roger Bivand <<a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>>
<br>
Sent: Friday, April 19, 2024 4:31 PM<br>
To: <a href="mailto:sibylle.stoeckli@gmx.ch">sibylle.stoeckli@gmx.ch</a><br>
Cc: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Subject: Re: [GRASS-user] Using RStudio in a GRASS GIS session<br>
<br>
Please see: <a href="https://rsbivand.github.io/rgrass/articles/use.html" originalsrc="https://rsbivand.github.io/rgrass/articles/use.html" shash="dWU8IyzIP3ar1pWERIeuHAalCa0WB0I9YX4PetQFKvx17HGLZZ1hSQniSrzHr07nwgpbUPrbBCU3TpKwAgW4zxEHpr3vCrJ7IwIVoNAgOqPsQ5QQ7E+5W5yyTT6QxMjRDhGLXbKP8n1odFgs8+zQ083ztrhA7Xur1jO74n9x/UE=">
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Frsbivand.github.io%2Frgrass%2Farticles%2Fuse.html&data=05%7C02%7CRoger.Bivand%40nhh.no%7C04d6d2c547b14550ec5f08dc608936de%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C638491389645818206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=3fLYSzCE3uRNBetqb69RxZz%2FzLiv%2F1LuBFkdb%2B19nsA%3D&reserved=0</a>.<br>
<a href="https://rsbivand.github.io/rgrass/articles/use.html" originalsrc="https://rsbivand.github.io/rgrass/articles/use.html" shash="dl9hyCMGLfMYmCIxu6ilEv81QCJE9PMX5YWADFrb02OJTaFMcbWFvbqTkidlA/TH7cilXwpvxH2t0is35/52WSbX5h00jH3FlXC7cB8MHfAGPdi591asLEKfcsAebRV0TSLHo/P8wHCeAVG670mwcAHlHHZCfeHTg2gQzvzlJRw=">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Frsbivand.github.io%2Frgrass%2Farticles%2Fuse.html&data=05%7C02%7CRoger.Bivand%40nhh.no%7C04d6d2c547b14550ec5f08dc608936de%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C638491389645826443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=zM%2Fia4%2BGNTgKd%2Bjxo3HVJnDgt02JrI9CSyx%2F1AtwK%2FU%3D&reserved=0</a><br>
<br>
Do you have a GRASS location and wish to use R on the data in that location?<br>
Then start GRASS first and start rstudio from inside GRASS.<br>
<br>
The error messages suggest that something is missing in your installation.<br>
<br>
Is your query related to<br>
<a href="https://stat.ethz.ch/pipermail/r-help/2024-April/479232.html" originalsrc="https://stat.ethz.ch/pipermail/r-help/2024-April/479232.html" shash="KXrC7eUKAcIruw3i9Ad/sFGYuGuAYRc3LU6TOOpUtkMxX0XnRMcQLCW1qpqzxmKo4cRQ7ETTKSq4Ie0QJsO4lgov+OAMjpC/TSIAjPUpPK0ah33z21QH50DsasuoC4FF3BuznhvsBz/Z75ivCNNtzib5LRXuGH96OUcIDI27+XY=">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fpipermail%2Fr-help%2F2024-April%2F479232.html&data=05%7C02%7CRoger.Bivand%40nhh.no%7C04d6d2c547b14550ec5f08dc608936de%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C638491389645832105%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=i1bTT5y7lmJcG1MtEniurDJsEYbK63t0UB%2BSagiLmMM%3D&reserved=0</a>
 ?<br>
<br>
--<br>
Roger Bivand<br>
Emeritus Professor<br>
Norwegian School of Economics<br>
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway <a href="mailto:Roger.Bivand@nhh.no">
Roger.Bivand@nhh.no</a></span></p>
</div>
<p class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">
 </p>
</div>
</div>
<br>
</div>
</body>
</html>