~/talk

Best practices for programming with ggplot2

Talkat rstudio::conf 2019 · 2019-01-15..01-18· [data-visualization]
slides:none on file

Reverse dependency checks find ~1,500 packages that import ggplot2 and >2,500 that suggest it, so concrete patterns matter: use the dot_data pronoun to let aes and facet specs accept string inputs; build the mapping and facet objects at the top so they can be conditionally removed; add NULL to a plot to mean “do nothing” instead of creating separate plot branches; import ggplot2 functions in the NAMESPACE to avoid ggplot2:: clutter; test images with vdiffr and expect_doppelganger after making a deterministic data generator.

AI-written summary · about

  1. 0:00Start
  2. 12:15Using ggplot2 in packages: namespacing
  3. 13:41Using ggplot2 in packages: undefined variables
  4. 15:03Using ggplot2 in packages: testing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.