Description Usage Arguments Value Author(s) See Also Examples
trellis.factor.key
is used during levelplot
-based plotting of factors (for
hyperSpec objects) unless transform.factor = FALSE
is specified.
1 | trellis.factor.key(f, levelplot.args = list())
|
f |
the factor that will be color-coded |
levelplot.args |
a list with levelplot arguments |
the modified list with levelplot arguments.
C. Beleites
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | chondro$z <- factor (rep (c("a", "a", "d", "c"),
length.out = nrow (chondro)),
levels = letters [1 : 4])
str (trellis.factor.key (chondro$z))
plotmap (chondro, z ~ x * y)
## switch off using trellis.factor.key:
## note that the factor levels are collapsed to c(1, 2, 3) rather than
## c (1, 3, 4)
plotmap (chondro, z ~ x * y, transform.factor = FALSE)
plotmap (chondro, z ~ x * y,
col.regions = c ("gray", "red", "blue", "dark green"))
|
Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Package hyperSpec, version 0.99-20180627
To get started, try
vignette ("hyperspec")
package?hyperSpec
vignette (package = "hyperSpec")
If you use this package please cite it appropriately.
citation("hyperSpec")
will give you the correct reference.
The project homepage is http://hyperspec.r-forge.r-project.org
List of 3
$ at : num [1:5] 0.5 1.5 2.5 3.5 4.5
$ col.regions: chr [1:4] "#FF80FFFF" "#FFD4FFFF" "#D4FFFFFF" "#80FFFFFF"
$ colorkey :List of 1
..$ lab:List of 2
.. ..$ at : int [1:4] 1 2 3 4
.. ..$ lab: chr [1:4] "a" "b" "c" "d"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.