Adapter for the Base R plotting system. This adapter uses function patching to intercept Base R plotting calls and detect plot types.
An R6 class inheriting from SystemAdapter
maidr::SystemAdapter -> BaseRAdapter
new()BaseRAdapter$new()
can_handle()BaseRAdapter$can_handle(plot_object)plot_objectThe plot object to check (should be NULL for Base R)
TRUE if Base R plotting is active, FALSE otherwise Detect the type of a single layer from Base R plot calls
detect_layer_type()BaseRAdapter$detect_layer_type(layer, plot_object = NULL)layerThe plot call entry from our logger
plot_objectThe parent plot object (NULL for Base R)
String indicating the layer type (e.g., "bar", "dodged_bar", "stacked_bar", "smooth", "line", "point") Check if a barplot call represents a dodged bar plot
is_dodged_barplot()BaseRAdapter$is_dodged_barplot(args)argsThe arguments from the barplot call
TRUE if this is a dodged bar plot, FALSE otherwise Check if a barplot call represents a stacked bar plot
is_stacked_barplot()BaseRAdapter$is_stacked_barplot(args)argsThe arguments from the barplot call
TRUE if this is a stacked bar plot, FALSE otherwise Create an orchestrator for this system (Base R)
create_orchestrator()BaseRAdapter$create_orchestrator(plot_object = NULL)plot_objectThe plot object to process (NULL for Base R)
PlotOrchestrator instance Get the system name
get_system_name()BaseRAdapter$get_system_name()System name string Get a reference to this adapter (for use by orchestrator)
get_adapter()BaseRAdapter$get_adapter()Self reference Check if plot has facets (Base R doesn't support facets)
has_facets()BaseRAdapter$has_facets(plot_object = NULL)plot_objectThe plot object (ignored for Base R)
FALSE (Base R doesn't support facets) Check if plot is a patchwork plot (Base R doesn't support patchwork)
is_patchwork()BaseRAdapter$is_patchwork(plot_object = NULL)plot_objectThe plot object (ignored for Base R)
FALSE (Base R doesn't support patchwork) Get recorded plot calls for processing
get_plot_calls()BaseRAdapter$get_plot_calls(device_id = grDevices::dev.cur())device_idGraphics device ID (defaults to current device)
List of recorded plot calls Clear recorded plot calls (for cleanup)
clear_plot_calls()BaseRAdapter$clear_plot_calls(device_id = grDevices::dev.cur())device_idGraphics device ID (defaults to current device) Initialize function patching
initialize_patching()BaseRAdapter$initialize_patching()NULL (invisible) Restore original functions
restore_functions()BaseRAdapter$restore_functions()NULL (invisible)
clone()The objects of this class are cloneable with this method.
BaseRAdapter$clone(deep = FALSE)deepWhether to make a deep clone.