Learn R Programming

ENiRG (version 1.0.1)

list.maps: List available raster and/or vector maps

Description

This function gives a list of maps in the current GRASS session, matching with a user-specified pattern.

Usage

list.maps(prefix = "*")

Arguments

prefix
character string. It states a pattern to search for.

Value

Return a list of all both vectorial and raster maps available in the current GRASS session, matching a regular expression.

Details

Argument prefix allows to list all maps matching a regular expression or pattern, i.e., "std_*" will search for all maps starting with "std_". See also https://en.wikipedia.org/wiki/Regular_expression regular expressions (aka regex) - from Wikipedia, the free encyclopedia.

References

https://grass.osgeo.org/grass70/manuals/g.list.html

See Also

map.info, import.egvs, initGRASS

Examples

Run this code
## Not run: 
# # starting GRASS session
# initGRASS("/usr/bin/grass-7.0.0", home=tempdir())
# initGRASS("C:/GRASS", home=tempdir())
# 
# ## Path of the files to be read
# predictor.names <- c("tann", "mntcm", "mxtwm", "rfann", "rfdm", "rfwm")
# file.names <- paste(system.file(package = "ENiRG"),
#                     "/ext/", predictor.names, ".asc", sep="")
# 
# import.egvs(file.names, predictor.names)
# 
# list.maps("rf*")
# list.maps("*ann")
# ## End(Not run)

Run the code above in your browser using DataLab