From 0814fd931287081499c0e0c30df9f5738d1fd849 Mon Sep 17 00:00:00 2001 From: Josh Sumner <51797700+joshqsumner@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:13:04 -0600 Subject: [PATCH] fixing how docs work with rdname --- R/stat_brms_model.R | 19 ------------------- R/stat_nlme_model.R | 18 ------------------ R/stat_nlrq_model.R | 18 ------------------ R/stat_nls_model.R | 17 ----------------- man/stat_growthss.Rd | 25 +++++++------------------ 5 files changed, 7 insertions(+), 90 deletions(-) diff --git a/R/stat_brms_model.R b/R/stat_brms_model.R index 0ab7ffd1..d36113d8 100644 --- a/R/stat_brms_model.R +++ b/R/stat_brms_model.R @@ -1,22 +1,3 @@ -#' Show brms model in ggplot layer -#' -#' @description -#' Add posterior predictive distribution from a brms model fit with \link{growthSS} and \link{fitGrowth} -#' to a ggplot object. -#' -#' @param mapping Set of aesthetic mappings created by \code{ggplot2::aes()}. If specified -#' and ‘inherit.aes = TRUE’ (the default), it is combined with the default mapping at the -#' top level of the plot. If there is no mapping then it is filled in by default using -#' the \code{ss} object. -#' @param data The data to be displayed in this layer. This behaves per normal ggplot2 -#' expectations except that if data is missing (ie, not inherited or specified) then the -#' data from \code{ss} is used. -#' @param fit A brmsfit object, typically returned from \code{fitGrowth}. -#' @param ss A \code{pcvrss} object. Only the "pcvrForm" and "df" elements are used. -#' @param CI A vector of Credible Intervals to plot, defaults to 0.95. -#' @param inherit.aes Logical, should aesthetics be inherited from top level? Defaults to TRUE. -#' @param ... Additional arguments passed to ggplot2::layer. -#' #' @import ggplot2 #' @rdname stat_growthss #' @keywords ggplot diff --git a/R/stat_nlme_model.R b/R/stat_nlme_model.R index 6ec81c93..a84f941a 100644 --- a/R/stat_nlme_model.R +++ b/R/stat_nlme_model.R @@ -1,21 +1,3 @@ -#' Show nlme/lme model in ggplot layer -#' -#' @description -#' Add predicted mean trendline from a nlme/lme model fit with \link{growthSS} and \link{fitGrowth} -#' to a ggplot object. -#' -#' @param mapping Set of aesthetic mappings created by \code{ggplot2::aes()}. -#' If specified and ‘inherit.aes = TRUE’ (the default), -#' it is combined with the default mapping at the top level of the plot. -#' If there is no mapping then it is filled in by default using the \code{ss} object. -#' @param data The data to be displayed in this layer. -#' This behaves per normal ggplot2 expectations except -#' that if data is missing (ie, not inherited or specified) then the data from \code{ss} is used. -#' @param fit A nlme/lme object, typically returned from \code{fitGrowth}. -#' @param ss A \code{pcvrss} object. Only the "pcvrForm" and "df" elements are used. -#' @param inherit.aes Logical, should aesthetics be inherited from top level? Defaults to TRUE. -#' @param ... Additional arguments passed to ggplot2::layer. -#' #' @import ggplot2 #' @rdname stat_growthss #' @keywords ggplot diff --git a/R/stat_nlrq_model.R b/R/stat_nlrq_model.R index b6b03505..f1237c31 100644 --- a/R/stat_nlrq_model.R +++ b/R/stat_nlrq_model.R @@ -1,21 +1,3 @@ -#' Show nls/lm model in ggplot layer -#' -#' @description -#' Add predicted mean trendline from a model fit with \link{growthSS} and \link{fitGrowth} -#' to a ggplot object. -#' -#' @param mapping Set of aesthetic mappings created by \code{ggplot2::aes()}. If specified -#' and ‘inherit.aes = TRUE’ (the default), -#' it is combined with the default mapping at the top level of the plot. -#' If there is no mapping then it is filled in by default using the \code{ss} object. -#' @param data The data to be displayed in this layer. -#' This behaves per normal ggplot2 expectations except -#' that if data is missing (ie, not inherited or specified) then the data from \code{ss} is used. -#' @param fit A brmsfit object, typically returned from \code{fitGrowth}. -#' @param ss A \code{pcvrss} object. Only the "pcvrForm" and "df" elements are used. -#' @param inherit.aes Logical, should aesthetics be inherited from top level? Defaults to TRUE. -#' @param ... Additional arguments passed to ggplot2::layer. -#' #' @import ggplot2 #' @rdname stat_growthss #' @keywords ggplot diff --git a/R/stat_nls_model.R b/R/stat_nls_model.R index 78aaf50a..a1d797dc 100644 --- a/R/stat_nls_model.R +++ b/R/stat_nls_model.R @@ -1,20 +1,3 @@ -#' Show nls/lm model in ggplot layer -#' -#' @description -#' Add predicted mean trendline from a model fit with \link{growthSS} and \link{fitGrowth} -#' to a ggplot object. -#' -#' @param mapping Set of aesthetic mappings created by \code{ggplot2::aes()}. -#' If specified and ‘inherit.aes = TRUE’ (the default), -#' it is combined with the default mapping at the top level of the plot. -#' If there is no mapping then it is filled in by default using the \code{ss} object. -#' @param data The data to be displayed in this layer. This behaves per normal ggplot2 expectations -#' except that if data is missing (ie, not inherited or specified) then the data from \code{ss} is used. -#' @param fit A brmsfit object, typically returned from \code{fitGrowth}. -#' @param ss A \code{pcvrss} object. Only the "pcvrForm" and "df" elements are used. -#' @param inherit.aes Logical, should aesthetics be inherited from top level? Defaults to TRUE. -#' @param ... Additional arguments passed to ggplot2::layer. -#' #' @import ggplot2 #' @rdname stat_growthss #' @keywords ggplot diff --git a/man/stat_growthss.Rd b/man/stat_growthss.Rd index bfec8124..528ca468 100644 --- a/man/stat_growthss.Rd +++ b/man/stat_growthss.Rd @@ -8,7 +8,7 @@ \alias{stat_lme_model} \alias{stat_nlrq_model} \alias{stat_nls_model} -\title{Show brms model in ggplot layer} +\title{Show a model fit with pcvr in a ggplot layer} \usage{ stat_brms_model( mapping = NULL, @@ -69,12 +69,13 @@ stat_nls_model( \item{mapping}{Set of aesthetic mappings created by \code{ggplot2::aes()}. If specified and ‘inherit.aes = TRUE’ (the default), it is combined with the default mapping at the top level of the plot. -If there is no mapping then it is filled in by default using the \code{ss} object.} +If there is no mapping then it is filled in by default using the \code{pcvrss} object.} -\item{data}{The data to be displayed in this layer. This behaves per normal ggplot2 expectations -except that if data is missing (ie, not inherited or specified) then the data from \code{ss} is used.} +\item{data}{The data to be displayed in this layer. +This behaves per normal ggplot2 expectations except +that if data is missing (ie, not inherited or specified) then the data from \code{ss} is used.} -\item{fit}{A brmsfit object, typically returned from \code{fitGrowth}.} +\item{fit}{A model object returned from \code{fitGrowth}.} \item{ss}{A \code{pcvrss} object. Only the "pcvrForm" and "df" elements are used.} @@ -82,23 +83,11 @@ except that if data is missing (ie, not inherited or specified) then the data fr \item{inherit.aes}{Logical, should aesthetics be inherited from top level? Defaults to TRUE.} -\item{...}{Additional arguments passed to ggplot2::layer.} +\item{...}{Additional arguments passed to the ggplot layer.} } \description{ -Add posterior predictive distribution from a brms model fit with \link{growthSS} and \link{fitGrowth} -to a ggplot object. - Add a model fit with \link{growthSS} and \link{fitGrowth} to a ggplot object. The exact geom used depends on the model class (see details). - -Add predicted mean trendline from a nlme/lme model fit with \link{growthSS} and \link{fitGrowth} -to a ggplot object. - -Add predicted mean trendline from a model fit with \link{growthSS} and \link{fitGrowth} -to a ggplot object. - -Add predicted mean trendline from a model fit with \link{growthSS} and \link{fitGrowth} -to a ggplot object. } \details{ These layers will behave largely like output from \code{\link{growthPlot}}, although \code{growthPlot}