|
143 | 143 |
|
144 | 144 | # create a nice lookup table to add to aqp |
145 | 145 | equivalent_munsell <- xin1 |
146 | | - names(equivalent_munsell) <- sprintf("%s %s/%s", munsell$hue, munsell$value, munsell$chroma) |
| 146 | + names(equivalent_munsell) <- formatMunsell(munsell$hue, munsell$value, munsell$chroma) |
147 | 147 |
|
148 | 148 | # this is only 107kB written to Rda |
149 | | - save(equivalent_munsell, file="data/equivalent_munsell.rda") |
| 149 | + save(equivalent_munsell, file = "data/equivalent_munsell.rda") |
150 | 150 |
|
151 | 151 | return(equivalent_munsell) |
152 | 152 | } |
|
215 | 215 | #' par(mar=c(0,0,1,1)) |
216 | 216 | #' |
217 | 217 | #' pie(rep(1, nrow(veryred)), col = with(veryred, munsell2rgb(hue, value, chroma)), |
218 | | -#' label = with(veryred, sprintf("%s %s/%s", hue, value, chroma))) |
| 218 | +#' label = with(veryred, formatMunsell(hue, value, chroma))) |
219 | 219 | #' |
220 | 220 | #' table(veryred$hue) # 2 hues |
221 | 221 | #' #> |
@@ -250,7 +250,7 @@ equivalentMunsellChips <- function(hue = NULL, value = NULL, chroma = NULL) { |
250 | 250 | munsell$chroma == chipdata$chroma[x]) |
251 | 251 | }) |
252 | 252 | res <- lapply(lidx, function(i) munsell[equivalent_munsell[i][[1]],]) |
253 | | - names(res) <- sprintf("%s %s/%s", hue, value, chroma) |
| 253 | + names(res) <- formatMunsell(hue, value, chroma) |
254 | 254 | rownames(res) <- NULL |
255 | 255 | return(res) |
256 | 256 | } |
|
0 commit comments