Created
May 1, 2015 06:12
-
-
Save rtanglao/1159f9636d2826374a0f to your computer and use it in GitHub Desktop.
rgb to single colour
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> tc <-function(x) { | |
+ return (head(color.id(x),n=1)) | |
+ } | |
> tc("#fefefe") | |
[1] "white" | |
> tc("#fefeff") | |
[1] "white" | |
> tc("#fefe00") | |
[1] "yellow" | |
> lappy(h$count,tc) | |
Error: could not find function "lappy" | |
> lapply(h$count,tc) | |
[[1]] | |
[1] "red" | |
[[2]] | |
[1] "magenta" | |
[[3]] | |
[1] "cyan" | |
[[4]] | |
[1] "magenta" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
colour_list2 = lapply(topcolour.ig.vancouver.2014$count,tc)