rand_ncolors | R Documentation |
Uses a data frame to create a vector of random color codes (one per row of data frame). This function uses a function created by Jason C Fisher at the United States Geological Survey (USGS).
rand_ncolors(df)
df |
This is the dataframe you want to use. Number of colors generated (i.e., length of char. vector) is the number of rows that df has. |
This function generates a character vector of hexadecimal color codes. This vector is then randomized using the sample function. Maximum of n is 256.
Andrew J. Van Leuven, vanleuven.3@osu.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.