From 7f22df6df2afca61e88a023ba70946ea01ec4a99 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Mon, 9 Nov 2020 17:45:02 +0100 Subject: [PATCH 1/4] Clarify that span is only used for loess in stat_smooth It can be surprising that `span` argument has no effect when number of observations is large. --- man/geom_smooth.Rd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 95c11217cb..a525b8d0b5 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -120,7 +120,9 @@ the default plot specification, e.g. \code{\link[=borders]{borders()}}.} \item{span}{Controls the amount of smoothing for the default loess smoother. Smaller numbers produce wigglier lines, larger numbers produce smoother -lines.} +lines. Only used when loess is used, i.e. when \code{method="loess"} +or when \code{method=NULL} (the default) and there are fewer than 1,000 +observations.} \item{fullrange}{Should the fit span the full range of the plot, or just the data?} From c3da07d0e8e27767de6b0a5d8e3dd5713e11f367 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Fri, 27 Nov 2020 12:24:06 +0100 Subject: [PATCH 2/4] Change docstring in .r file --- R/stat-smooth.r | 4 +++- man/geom_smooth.Rd | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/R/stat-smooth.r b/R/stat-smooth.r index ad9b438967..bb119eca20 100644 --- a/R/stat-smooth.r +++ b/R/stat-smooth.r @@ -25,7 +25,9 @@ #' @param level Level of confidence interval to use (0.95 by default). #' @param span Controls the amount of smoothing for the default loess smoother. #' Smaller numbers produce wigglier lines, larger numbers produce smoother -#' lines. +#' lines. Only used with loess, i.e. when `method="loess"`, +#' or when `method=NULL` (the default) and there are fewer than 1,000 +#' observations. #' @param n Number of points at which to evaluate smoother. #' @param method.args List of additional arguments passed on to the modelling #' function defined by `method`. diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index a525b8d0b5..1cba8c0a4c 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -120,7 +120,7 @@ the default plot specification, e.g. \code{\link[=borders]{borders()}}.} \item{span}{Controls the amount of smoothing for the default loess smoother. Smaller numbers produce wigglier lines, larger numbers produce smoother -lines. Only used when loess is used, i.e. when \code{method="loess"} +lines. Only used with loess, i.e. when \code{method="loess"}, or when \code{method=NULL} (the default) and there are fewer than 1,000 observations.} From 6339658b7b12de05c16c98ac9a8b01dcc98d4a4c Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Fri, 27 Nov 2020 15:56:20 +0100 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Hiroaki Yutani --- R/stat-smooth.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/stat-smooth.r b/R/stat-smooth.r index bb119eca20..6dc63cc647 100644 --- a/R/stat-smooth.r +++ b/R/stat-smooth.r @@ -25,8 +25,8 @@ #' @param level Level of confidence interval to use (0.95 by default). #' @param span Controls the amount of smoothing for the default loess smoother. #' Smaller numbers produce wigglier lines, larger numbers produce smoother -#' lines. Only used with loess, i.e. when `method="loess"`, -#' or when `method=NULL` (the default) and there are fewer than 1,000 +#' lines. Only used with loess, i.e. when `method = "loess"`, +#' or when `method = NULL` (the default) and there are fewer than 1,000 #' observations. #' @param n Number of points at which to evaluate smoother. #' @param method.args List of additional arguments passed on to the modelling From d0271d8338e2588f7dfa5b7ff92264e53bbab5ea Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 27 Nov 2020 15:11:24 +0000 Subject: [PATCH 4/4] Document --- man/geom_smooth.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/geom_smooth.Rd b/man/geom_smooth.Rd index 1cba8c0a4c..afff989f46 100644 --- a/man/geom_smooth.Rd +++ b/man/geom_smooth.Rd @@ -120,8 +120,8 @@ the default plot specification, e.g. \code{\link[=borders]{borders()}}.} \item{span}{Controls the amount of smoothing for the default loess smoother. Smaller numbers produce wigglier lines, larger numbers produce smoother -lines. Only used with loess, i.e. when \code{method="loess"}, -or when \code{method=NULL} (the default) and there are fewer than 1,000 +lines. Only used with loess, i.e. when \code{method = "loess"}, +or when \code{method = NULL} (the default) and there are fewer than 1,000 observations.} \item{fullrange}{Should the fit span the full range of the plot, or just