-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Updating most visited docs (#2553) #2727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove duplicate graph from examples: extra layers now appear in legend by default and thus the example is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far.
It would also be good to consider the page as a whole. For example, looking at https://ggplot2.tidyverse.org/reference/theme.html, is there some way we could make the initial paragraph more useful? Could we group some of the parameters together to reduce the cognitive load a bit? Can we link element_line
in the parameter descriptions? Should we also link to vignette("ggplot2-specs")
? (These bigger changes might be better as individual PRs)
R/geom-bar.r
Outdated
@@ -4,7 +4,7 @@ | |||
#' bar proportional to the number of cases in each group (or if the | |||
#' `weight` aesthetic is supplied, the sum of the weights). If you want the | |||
#' heights of the bars to represent values in the data, use | |||
#' \link{geom_col} instead. `geom_bar` uses `stat_count` by | |||
#' `geom_col` instead. `geom_bar` uses `stat_count` by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put ()
after function calls?
@@ -18,7 +18,7 @@ | |||
#' There is no one solution to this problem, but there are some techniques |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section starting "The bubblechart" seems a bit weak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to fill this PR just with minor edits and go back through for bigger changes to text in separate PRs. For instance here with "bubblechart", and with theme, etc.
@hadley This is ready to review & merge. Larger changes to documentation will be made in separate PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wooo! Impressive work – just a few minor (minour? minotaur?) changes here and there.
R/fortify-map.r
Outdated
@@ -85,7 +85,7 @@ map_data <- function(map, region = ".", exact = FALSE, ...) { | |||
#' @param regions map region | |||
#' @param fill fill colour | |||
#' @param colour border colour | |||
#' @param xlim,ylim latitudinal and logitudinal range for extracting map | |||
#' @param xlim,ylim latitudinal and longitudinal range for extracting map |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
range ⇨ ranges (since there are now two of them to which we are referring)
R/geom-bar.r
Outdated
@@ -1,12 +1,12 @@ | |||
#' Bar charts | |||
#' | |||
#' There are two types of bar charts: `geom_bar` makes the height of the | |||
#' There are two types of bar charts: `geom_bar()` makes the height of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stylistic, but since we open with two types...: I would follow the colon with "geom_bar()
and geom_col()
. geom_bar()
makes..."
R/geom-boxplot.r
Outdated
@@ -49,7 +49,7 @@ | |||
#' if the notches of two boxes do not overlap, this suggests that the medians | |||
#' are significantly different. | |||
#' @param notchwidth For a notched box plot, width of the notch relative to | |||
#' the body (default 0.5) | |||
#' the body (default = `0.5`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we surrounding just the value of an argument with backticks? (I'm genuinely asking—if so, I think we're inconsistent)
Move backticks to surround argument and value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, for now I have left this as is because default is not an actually argument name. I could change this a couple ways:
- "defaults to
notchwidth = 0.5
" - "default value is
0.5
" - removal all together, they can look up to the function usage section?
preference? other options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like defaults to notchwidth = 0.5
— though, honestly, both make sense. Go with where the spirit moves you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
R/geom-smooth.r
Outdated
@@ -7,7 +7,7 @@ | |||
#' | |||
#' Calculation is performed by the (currently undocumented) | |||
#' `predictdf` generic and its methods. For most methods the standard | |||
#' error bounds are computed using the [predict()] method - the | |||
#' error bounds are computed using the [predict()] method -- the | |||
#' exceptions are `loess` which uses a t-based approximation, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commas between the geom and the descriptor (i.e. "loess
, which..." and "glm
, where...") I'm less wed to the one with glm, though.
R/geom-smooth.r
Outdated
@@ -20,14 +20,14 @@ | |||
#' @seealso See individual modelling functions for more details: | |||
#' [lm()] for linear smooths, | |||
#' [glm()] for generalised linear smooths, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're giving this one sentence structure (which we are, since there's a period after the last one) there should be an "and" added to the second to last list item. (Basically, "bulleted lists within sentences" structure: http://blog.apastyle.org/apastyle/2010/03/lists-part-5-bulleted-lists.html)
R/guide-colorbar.r
Outdated
#' smoother colorbar for a larger value. | ||
#' @param raster A logical. If `TRUE` then the colorbar is rendered as a | ||
#' raster object. If `FALSE` then the colorbar is rendered as a set of | ||
#' @param nbin A numeric specifying the number of bins for drawing colourbar. A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an article before "colourbar" (If you can have more than one, then "a," if not, then "the.")
@@ -4,8 +4,8 @@ | |||
#' Legend guides for various scales are integrated if possible. | |||
#' | |||
#' Guides can be specified in each `scale_*` or in [guides()]. | |||
#' `guide="legend"` in `scale_*` is syntactic sugar for | |||
#' `guide=guide_legend()` (e.g. `scale_color_manual(guide = "legend")`). | |||
#' `guide = "legend"` in `scale_*` is syntactic sugar for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re. my comment about backticks around arguments and their value, here there are backticks around both argument and value. I think we're wrapping both (see http://style.tidyverse.org/news.html#general-style), so I'd just move the backticks where mentioned earlier to encompass the argument name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree in principle however "default" (from above) is not an actual argument name where guide
is. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, oh! I missed that. That makes sense. I almost think that it'd be better not to use =
, in that case (e.g. is 0.5
by default, or default is 0.5
or whatever).
@@ -161,16 +161,16 @@ | |||
#' (`element_text`; inherits from `title`) left-aligned by default | |||
#' @param plot.tag.position The position of the tag as a string ("topleft", | |||
#' "top", "topright", "left", "right", "bottomleft", "bottom", "bottomright) | |||
#' or a coordinate. If a string, extra space will be added to accomodate the | |||
#' or a coordinate. If a string, extra space will be added to accommodate the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 I never spell the word accommodate correctly on the first try.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
A PR for various minor edits to documentation as I review and update the top 20 most visited webpages (#2553).
As this grows we may need to break it up into separate PRs. For now, I'm purposely holding off on committing updated .Rd files because edits like my removing a single unnecessary period in
layer.r
propagate into 20+ pages and will clutter the PR.