Skip to content

Commit cc48035

Browse files
authored
Improve stat_smooth documentation. (#2681)
1 parent 66ebf0a commit cc48035

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

R/stat-smooth.r

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
#' For `method = "auto"` the smoothing method is chosen based on the
55
#' size of the largest group (across all panels). [loess()] is
66
#' used for less than 1,000 observations; otherwise [mgcv::gam()] is
7-
#' used with `formula = y ~ mgcv::s(x, bs = "cs")`. Somewhat anecdotally,
7+
#' used with `formula = y ~ s(x, bs = "cs")`. Somewhat anecdotally,
88
#' `loess` gives a better appearance, but is O(n^2) in memory, so does
99
#' not work for larger datasets.
10+
#'
11+
#' If you have fewer than 1,000 observations but want to use the same `gam`
12+
#' model that `method = "auto"` would use then set
13+
#' `method = "gam", formula = y ~ s(x, bs = "cs")`.
1014
#' @param formula Formula to use in smoothing function, eg. `y ~ x`,
1115
#' `y ~ poly(x, 2)`, `y ~ log(x)`
1216
#' @param se Display confidence interval around smooth? (TRUE by default, see

man/aes.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/geom_smooth.Rd

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)