[R-sig-Geo] "g.list" in rgrass7 returns an integer and not a char. vector
Mathieu Rajerison
m@th|eu@r@jer|@on @end|ng |rom gm@||@com
Fri Apr 12 15:23:38 CEST 2019
Thanks a lot !
Le ven. 12 avr. 2019 à 15:05, Micha Silver <tsvibar using gmail.com> a écrit :
>
> On 12/04/2019 15:15, Mathieu Rajerison wrote:
>
> 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 ?
>
>
> execGRASS("g.list", type="raster", pattern="global*") %>% class()
>
> 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 ?
>
>
> Adding intern=TRUE to the execGRASS command works for me:
>
>
> > execGRASS("g.list", type="rast", pattern="meron*", intern=TRUE) %>% class
> [1] "character"
>
>
> --
> Micha Silver
> Ben Gurion Univ.
> Sde Boker, Remote Sensing Lab
> cell: +972-523-665918
>
>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list