Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hadley/ggplot2
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Sep 8, 2015
2 parents 3896155 + 2ef8d0a commit 9c7fb3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vignettes/extending-ggplot2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ ggplot(mpg, aes(displ, hwy)) +
stat_lm(formula = y ~ poly(x, 10), geom = "point", colour = "red", n = 20)
```

Note that don't _have_ to explicitly include the new parameters in the arguments for the layer, `...` will get passed to the right place anyway. But you'll need to document them somewhere so the user knows about them. Here's a brief example. Note `@inheritParams ggplot2:stat_identity`: that will automatically inherit documentation for all the parameters also defined for `stat_identity()`.
Note that don't _have_ to explicitly include the new parameters in the arguments for the layer, `...` will get passed to the right place anyway. But you'll need to document them somewhere so the user knows about them. Here's a brief example. Note `@inheritParams ggplot2::stat_identity`: that will automatically inherit documentation for all the parameters also defined for `stat_identity()`.

```{r}
#' @inheritParams ggplot2:stat_identity
#' @inheritParams ggplot2::stat_identity
#' @param formula The modelling formula passed to \code{lm}. Should only
#' involve \code{y} and \code{x}
#' @param n Number of points used for interpolation.
Expand Down

0 comments on commit 9c7fb3e

Please sign in to comment.