LG_explain_plot: Explain the content of a plot.

Description Usage Arguments Value

View source: R/LG_explain_plot.R


This function gives information about the different plots created by this package. It is used internally in the shiny-application, and it can also be used when a plot is desired included in an article/presentation. In the latter case the plot must first be saved to an object, and that object can then be given to this function in the argument .plot_details. Note that the returned text is based on the information that the saved plot-object has in the attribute named details, and it is thus of course possible to create customised presentations directly based on the information found there.


LG_explain_plot(.plot_details, .mode = NULL, .digits_for_points = 2,
  .digits_for_percentiles = 0)



This can either be a saved plot created by this package, or it can be the details-list directly. (The latter alternative is included to simplify the use of this function inside of the internal shiny-application.)


Specify the mode that the result will be returned in. Two modes are supported, "markdown" and "latex". The default value NULL will trigger the selection of "latex" if .plot_details is given as a saved ggplot2-object, whereas "markdown" will be selected when .plot_details is given as a list.


An integer that specifies the number of decimals to include when presenting a point. The default value is 2.


An integer that specifies the number of decimals to include when presenting the percentiles (of the standard normal distribution) that corresponds to the point. The default value is 0.


The returned result will be a description of the plot in .plot_details, in the mode specified by .mode.

LAJordanger/localgaussSpec documentation built on July 28, 2017, 12:15 a.m.