Skip to content

Feature/stefanedwards labeller #910

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

stefanedwards
Copy link
Contributor

Resubmitting #904:
These two functions aid when labelling facets. labeller allows for
providing multiple named vectors and/or methods to change the labels for
each margin. label_wrap_gen allows labels to be word wrapped.

These two functions aid when labelling facets. labeller allows for
providing multiple named vectors and/or methods to change the labels for
each margin. label_wrap_gen allows labels to be word wrapped.
@hadley
Copy link
Member

hadley commented Feb 25, 2014

  • Motivate the change in one paragraph, and include it in NEWS.
    In parenthesis, reference your github user name and this issue:
    (@hadley, #1234)
  • Check pull request only includes relevant changes.
  • Use the official style.
  • Update documentation and re-run roxygen2
  • Add minimal example, if new graphical feature

Sorry, something went wrong.

#' @seealso , \code{\link{labeller}}
#' @examples
#' set.seed(331)
#' x=runif(60)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please follow http://adv-r.had.co.nz/Style.html? i.e. x <- runif(60). But I think this whole block could be done inside data.frame(), or better, use an existing built-in dataframe.

function(variable, values) {
str(values)
if (is.logical(values)) {
values <- as.integer(values)+1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces around + please

@hadley
Copy link
Member

hadley commented Mar 25, 2014

If you can make the suggested changes this week, you contribution will make it into the next version of ggplot2.

Fixed stylebugs.
Behaviour in labeller when passed a method has been simplified; now it
'guesses' how many arguments the method needs and absed on that attempts
to pass either "values", or "variable" and "values". It's basically in
the users hands now to provide a fitting method.
@stefanedwards
Copy link
Contributor Author

Do I need to do something else? I've uploaded my changes.

#' @examples
#'
#' data(mpg)
#' ggplot(mpg, aes(cty, hwy)) + geom_point() + facet_grid(cyl ~ class, labeller=label_both)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please wrap these lines?

@hadley
Copy link
Member

hadley commented Mar 28, 2014

Added a few more comments. All needs a paragraph in NEWS. Thanks!

Wrapped lines.
Removed dependency on Hmisc in example to labeller.
Replaced sapply with vapply in label_wrap_gen.
@hadley hadley added the feature label Apr 22, 2014
@hadley hadley added this to the v1.0.0 milestone Apr 22, 2014
hadley added a commit that referenced this pull request Apr 23, 2014
@hadley hadley closed this Apr 23, 2014
@lock
Copy link

lock bot commented Jan 19, 2019

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/

1 similar comment
@lock
Copy link

lock bot commented Jul 18, 2019

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/

@lock lock bot locked and limited conversation to collaborators Jul 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants