Description Usage Arguments Details Value Author(s) References See Also Examples
Reads and parses a GRASS GIS color table from a text file or directly. Either filename or text must be specified.
1 | read.gis.pal(filename, text)
|
filename |
The name of a text file containing a GRASS GIS color table. |
text |
The text of a GRASS GIS color table. |
GRASS GIS color tables can mix percentages and data values, and named and RGB
color specifications. This function imports them into a palette format usable
in R
.
Returns a data frame with three columns:
value |
The data value or percentage associated with each color. |
pct |
TRUE if the entry is a percentage; FALSE for a data value. |
color |
Color specification in hexadecimal format. |
Sarah Goslee
More information on GRASS GIS color tables is available from the manual at https://grass.osgeo.org/grass70/manuals/r.colors.html.
1 2 3 4 5 6 7 | samplepal <- read.gis.pal(text =
"0 black
10
78 blue
100
nv white")
display.gis.pal(pal=samplepal)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.