From 00010254565681484128feea2028b3c6853e713c Mon Sep 17 00:00:00 2001 From: Scott Claessens Date: Thu, 19 Sep 2024 11:21:08 +0100 Subject: [PATCH] Update documentation --- R/coev_plot_flowfield.R | 4 ++++ R/coev_plot_selection_gradient.R | 4 ++++ man/coev_plot_flowfield.Rd | 20 ++++++++++++++++---- man/coev_plot_selection_gradient.Rd | 15 ++++++++++++++- 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/R/coev_plot_flowfield.R b/R/coev_plot_flowfield.R index 56aef14..3e44fd8 100644 --- a/R/coev_plot_flowfield.R +++ b/R/coev_plot_flowfield.R @@ -28,6 +28,10 @@ #' more traits were included in the model, other traits are held at their #' median values during these computations. #' +#' If the plot does not look right, the user might try zooming out from the +#' default parameter space by setting wider limits. For some variables (e.g., +#' continuous and count variables), the default limits may not be suitable. +#' #' @references #' Ringen, E., Martin, J. S., & Jaeggi, A. (2021). Novel phylogenetic methods #' reveal that resource-use intensification drives the evolution of "complex" diff --git a/R/coev_plot_selection_gradient.R b/R/coev_plot_selection_gradient.R index e6ce68c..41c1433 100644 --- a/R/coev_plot_selection_gradient.R +++ b/R/coev_plot_selection_gradient.R @@ -28,6 +28,10 @@ #' traits were included in the model, other traits are held at their median #' values during these computations. #' +#' If the plot does not look right, the user might try zooming out from the +#' default parameter space by setting wider limits. For some variables (e.g., +#' continuous and count variables), the default limits may not be suitable. +#' #' @references #' Ringen, E., Martin, J. S., & Jaeggi, A. (2021). Novel phylogenetic methods #' reveal that resource-use intensification drives the evolution of "complex" diff --git a/man/coev_plot_flowfield.Rd b/man/coev_plot_flowfield.Rd index 22ed79c..8b0846b 100644 --- a/man/coev_plot_flowfield.Rd +++ b/man/coev_plot_flowfield.Rd @@ -5,7 +5,13 @@ \title{Plot flowfield of expected evolutionary change from a fitted \code{coevfit} object} \usage{ -coev_plot_flowfield(object, var1, var2, nullclines = FALSE) +coev_plot_flowfield( + object, + var1, + var2, + nullclines = FALSE, + limits = c(-2.5, 2.5) +) } \arguments{ \item{object}{An object of class \code{coevfit}} @@ -17,9 +23,11 @@ the model} the model} \item{nullclines}{Logical (defaults to FALSE); whether to show coloured -nullclines -to indicate where each variable is at equilibrium, depending on the state of -the other} +nullclines to indicate where each variable is at equilibrium, depending on +the state of the other} + +\item{limits}{A numeric vector of length 2 (defaults to \code{c(-2.5, 2.5)}); +specifying the lower limit and the upper limit of the x and y axes.} } \value{ A flowfield plot drawn directly to the device @@ -36,6 +44,10 @@ included, they represent the parameter combinations where each trait is at equilibrium, depending on the state of the other trait If three or more traits were included in the model, other traits are held at their median values during these computations. + +If the plot does not look right, the user might try zooming out from the +default parameter space by setting wider limits. For some variables (e.g., +continuous and count variables), the default limits may not be suitable. } \examples{ \dontrun{ diff --git a/man/coev_plot_selection_gradient.Rd b/man/coev_plot_selection_gradient.Rd index dc1da4a..3ab95f9 100644 --- a/man/coev_plot_selection_gradient.Rd +++ b/man/coev_plot_selection_gradient.Rd @@ -4,7 +4,13 @@ \alias{coev_plot_selection_gradient} \title{Plot selection gradient heatmap from a fitted \code{coevfit} object} \usage{ -coev_plot_selection_gradient(object, var1, var2, contour = FALSE) +coev_plot_selection_gradient( + object, + var1, + var2, + contour = FALSE, + limits = c(-2.5, 2.5) +) } \arguments{ \item{object}{An object of class \code{coevfit}} @@ -17,6 +23,9 @@ the model} \item{contour}{Logical (defaults to FALSE); whether to show white contour lines to indicate where selection is stronger than drift} + +\item{limits}{A numeric vector of length 2 (defaults to \code{c(-2.5, 2.5)}); +specifying the lower limit and the upper limit of the x and y axes.} } \value{ A \code{ggplot} object @@ -35,6 +44,10 @@ values greater than 1 (or less than -1) indicate parameter space where positive (or negative) selection is stronger than drift. If three or more traits were included in the model, other traits are held at their median values during these computations. + +If the plot does not look right, the user might try zooming out from the +default parameter space by setting wider limits. For some variables (e.g., +continuous and count variables), the default limits may not be suitable. } \examples{ \dontrun{