paletteToR: Convert a palette to R colours

Description Usage Arguments Value Examples

View source: R/cultural-analytics.r

Description

This function converts a palette represented as a data.frame into a vector of R colours ready for plotting.

Usage

1

Arguments

palette

A data.frame with red, green and blue columns representing a palette..

Value

A vector of R colors.

Examples

1
2
3
library(colorspace)
palette<-data.frame(red=c(0.1, 0.2, 0.3), green=c(0.4, 0.5, 0.6), blue=c(0.7, 0.8, 0.9))
rColours<-paletteToR(palette)

CulturalAnalytics documentation built on May 31, 2017, 3:28 a.m.