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