LG_plot_helper: Helper-function for 'LG_plot'.

View source: R/LG_plot_helper.R

LG_plot_helperR Documentation

Helper-function for LG_plot.

Description

This function extracts the desired array of local Gaussian (auto- or cross-) correlations from file, and then it sends those to the relevant plot-function in order to create the plot of interest.

Usage

LG_plot_helper(main_dir, input, input_curlicues = NULL, .env)

Arguments

main_dir

The part of the data_dir-argument from the function LG_shiny, that specifies the main path to where the information is stored. Note that this argument only is required when the function is called outside of the shiny application. (Inside of the shiny-application, the relevant information will be extracted from .env.)

input

A list with the arguments needed in order to extract the desired data for the plot of interest.

input_curlicues

A list that can be used when this function is used outside of the shiny-application. This can be used to fine-tune details related to the annotated information. It is also possible to drop annotation from the plot, which might be of interest when many plots are to be included in a grid-based setup. The default value NULL will ensure that the plot will be created with the same setting that was used in the shiny-application (this might however not produce decent-looking plots when a grid of plots is created and saved to file).

.env

An environment in which .arr will be updated. This argument can be skipped when called in a non-interactive setting.

Details

This function is used as a helper in in the interactive setup of LG_shiny, but it can also be called in a non-reactive environment. The interactive interface can be used to trigger the creation of the code needed in order to use this function in a non-reactive setting (which can be of interest e.g. when an example should be used in a paper/presentation).

The plots created by this function when it is used in a non-reactive setting, will contain an attribute details that can be used to extract information about the content. The function LG_extract_details can be used to obtain the same information that was available in the interactive interface, or the user can extract the components of interest in order to produce other presentations too.

Value

The default behaviour is that a plot-object will be returned, with attributes describing the content. The information can be extracted from the plot-object by the help of LG_explain_plot.


LAJordanger/localgaussSpec documentation built on May 6, 2023, 4:31 a.m.