pal_vector {wacolors} | R Documentation |
Output a character vector containing code for a palette
Description
Call this function to get the code for a character vector containing a palette. If using RStudio, the code will be loaded at the console prompt; otherwise, it will be printed at the terminal.
Usage
pal_vector(
palette,
n,
which = NULL,
type = c("discrete", "continuous"),
reverse = FALSE
)
Arguments
palette |
The name of the palette (partial matching supported), or an
actual palette from |
n |
The number of colors in the palette. If this exceeds the actual
number and |
which |
if not |
type |
Either |
reverse |
|
Value
The generated code, invisibly, as a character vector.
Examples
pal_vector("rainier", 4)
[Package wacolors version 0.3.1 Index]