I am using GRASS and R to analyse some hyperspectral data. I would like to export my spectral layers to one .img file that is compatible with ENVI. So far, I have used g.mlist to select the appropriate layers, and now I am using i.group to create the group from these layers that I could export with r.out.gdal.
I see that i.group takes an input parameter that is the list of raster layer names - I have about 100 of these, so I am looking for a way to avoid typing them individually!
My question essentially is, I've exported the names from g.mlist to a text file - is there a way to use this file in the input parameter?
This is probably a very basic problem, and is due to my programming inexperience.
I would like to use something like:
system("i.group group=MSP1 input=/home/Documents/MSP/list.txt")
Except that /home/Documents/MSP/list.txt is not a raster map.
Or, if anyone knows of a better way to export multiple image layers into one file, that would also be great.