<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 12/04/2019 15:15, Mathieu Rajerison
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGfc75=F9Y0un5qh0Yx_+Kk+UgnhxiMzxDKi==gLyadwp1Fd0g@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">Hi List,
I try to get the list of rasters which are in my working environment but
the result of execGRASS("g.list") is an integer, not a character vector
Why is that ?
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">execGRASS("g.list", type="raster", pattern="global*") %>% class()
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">global_glob_rad_day1
global_glob_rad_day2
global_glob_rad_day3
[1] "integer"
How to get a list of my rasters as a character ?</pre>
</blockquote>
<p><br>
</p>
<p>Adding intern=TRUE to the execGRASS command works for me:</p>
<p><br>
</p>
<p><tt>> execGRASS("g.list", type="rast", pattern="meron*",
intern=TRUE) %>% class</tt><tt><br>
</tt><tt>[1] "character"</tt><br>
<br>
</p>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>