talk_id | talk_slug | talk_type | talk_tags | session_slug | talk_title | talk_title_short | talk_materials_url | speakers | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22100 |
cracking-open-ggplot-internals-ggtrace |
regular |
|
advanced-r |
Cracking open ggplot internals with {ggtrace} |
Cracking open ggplot internals with {ggtrace} |
|
The inner workings of {ggplot2} are difficult to grasp even for experienced users because its internal object-oriented (ggproto) system is hidden from user- facing functions, by design. This is exacerbated by the foreignness of ggproto itself, which remains the largest hurdle in the user-to-developer transition. However this needs not to be the case: ggplot internals have clear parallels to data wrangling, where data is passed between methods that take inputs and return outputs. Capitalizing on this connection, package {ggtrace} exposes the familiar functional programming logic of ggplot with functions that inspect, capture, or modify steps in a ggplot object's execution pipeline, enabling users to learn the internals through trial-and-error.