Skip to content

Make RR_pal DRY #3

@ohjakobsen

Description

@ohjakobsen

RR_pal <- function(fill=TRUE) {

The RR_pal() function can be made DRY by adding all possible values to a vector and then choosing the right number, ie.:

pal <- c('red', 'blue', 'green', 'yellow')
i <- pal[1L:n)

Also, a maximum of 9 colors can be limiting (although discrete graphics should have even fewer categories than 9). Factors support up to 32 values. While this might be a lot, we should definitely go beyond 9. A very simple solution can be to simply recycle colors.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions