Skip to content
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

fix and unify small issues #236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

xx02al
Copy link

@xx02al xx02al commented Nov 8, 2024

No description provided.

@@ -47,7 +48,7 @@ ggplot(aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
)

# Bad
ggplot(aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
iris |> ggplot(aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to make the only 'bad' aspect the one about arguments on a long line.

Suggested change
iris |> ggplot(aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
iris |>
ggplot(aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +

Copy link
Author

Choose a reason for hiding this comment

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

totally fine what you suggest

@@ -32,12 +32,12 @@ Avoid using the pipe when:
# Good
iris |>
summarize(across(where(is.numeric), mean), .by = Species) |>
pivot_longer(-Species, names_to = "measure", values_to = "value") |>
pivot_longer(!Species, names_to = "measure", values_to = "value") |>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does - no longer work? Is it discouraged?

Copy link
Author

Choose a reason for hiding this comment

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

it works, but I feel ! would fit better since e.g. ?dplyr::select advertises ! for taking the complement of a set of variables

@@ -2,7 +2,7 @@

## Naming

As well as following the general advice for [object names], strive to use verbs for function names:
As well as following the general advice for object names in @sec-objectnames, strive to use verbs for function names:
Copy link
Collaborator

Choose a reason for hiding this comment

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

how does this reference work? I would have expected maybe [object names](syntax#sec-objectnames) instead.

Copy link
Author

Choose a reason for hiding this comment

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

I've added {#sec-objectnames} accordingly, but linking is also good

@@ -175,7 +175,7 @@ There are a few exceptions, which should never be surrounded by spaces:
)
```

Note that single-sided formulas with a complex right-hand side do need a space:
Note that single-sided formulas with a complex right-hand side do need a space.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am fine with : here and above, could you explain more?

Copy link
Author

Choose a reason for hiding this comment

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

I just thought it would be in the spirit of things to make it uniform for all consecutive bullet points

Copy link
Collaborator

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants