I want to practice the contents covered in R packages, and learn by example. So I am trying to make a copy of of
wesanderson, an R package listing representative color palettes of Wes Anderson’s movies. My
tarantino might not be that practical in real life, since it’s not that vivid in color selections. It just strengthens my understanding of the R package dev workflow, as well as the package structures, some components not covered in that previous book. (It is still a must-read.)
- Get palettes of classic scenes from Quentin Tarantino’s movies. Movies in Color. It’s also the source of package
- Write in
/Rdirectory and use
devtools::load_all()in terminal to do some manual tests.
styler::style_pkg()to style my coding.
devtools::test(), interactively select 1 to create a directory
usethis::use_mit_license(), change the
COPYRIGHT HOLDERin newly generated
- Now use
roxygen2style to write the documentation above every functions in
devtools::document()to generate corresponding
- No need to write vignettes for this package though, it’s pretty simple.
- Modify details in
- Back to write some tests. Write in the
devtools::test()to execute and read the results.
README.mdbased on changes made in
pkgdown::build_site(). This will build a site based on my
- Figma to create the package badge.
NEWS.mdto keep track of changes in the package.
I actually did not pay much attention to the hue, saturation, brightness of the selection of colors. So this leads to a pretty funny dilemma that:
- If I order the colors in a spectrum order, the colors might not be distinguishable enough.
- If I just leave the colors in an random order as they are, the generated “continuous” colors will show no logic in a “heatmap”. For example,
pal <- tarantino_palette("KillBillVol1", 100, "continuous") heatmap(as.matrix(mtcars), scale="column", col = pal)
NEWS.mdto a separate page in
- Updated on 2021-02-13. Add color palettes of The Hateful Eight and Once Upon a Time in Hollywood.
- Publish the
pkgdownsite with GitHub Actions.
You can download and use the development version of this package from GitHub.