create_gdm_lineplot_predictorwise_thresholds: create lineplots of all thresholds

View source: R/plot_multifun_thresholds.R

create_gdm_lineplot_predictorwise_thresholdsR Documentation

create lineplots of all thresholds

Description

Creat lineplots for the weighted average models over all thresholds. The basic shape and appearance is the same as in GDM lineplots, when using the function 'create_gdm_lineplot'.

Usage

create_gdm_lineplot_predictorwise_thresholds(
  data,
  legend = F,
  ribbon = T,
  ribbontype = "se",
  ymax = 1,
  plottitle = ""
)

Arguments

data

data.table, produced in 'GDM_multifun_thresholds.Rmd').

legend

logical T or F, indicating if the plot or the legend should be returned.

ribbon

logical. T if error bands should be shown, F otherwise.

ribbontype

character, either "se" or "sd". Defines the type of errorbands shown if ribbon is set T (i.e. error bands are shown)

ymax

the maximum y value shown. Defaults to 1.

plottitle

a character giving the title of the plot. Defaults to no title.

Details

The shown lines are either (1) the extracted Isplines from the GDM models, or (2) the weighted averages over all thresholds. The weighted averages are calculated at each X value, per predictor, per model type (turnover / nestedness). The predicted Y values are weighted by their inverse standard deviation.

Used the overview table 'ǹicenames.csv' for graphical parameters as line types and color. Can plot a legend if legend is set to T, but the legend is recommended to be produced by the function 'get_nice_legend'.

TODO : remove x axis for above plots

Value

a ggplot2 plot element, with lineplots.


allanecology/BetaDivMultifun documentation built on Nov. 9, 2023, 8:47 p.m.