Skip to content

Fix #1583: Support .data pronoun in uncount()#1629

Closed
mrv0for0vandeta wants to merge 1 commit into
tidyverse:mainfrom
mrv0for0vandeta:fix-1583
Closed

Fix #1583: Support .data pronoun in uncount()#1629
mrv0for0vandeta wants to merge 1 commit into
tidyverse:mainfrom
mrv0for0vandeta:fix-1583

Conversation

@mrv0for0vandeta

Copy link
Copy Markdown

No description provided.

Comment thread R/uncount.R
# best answer. See https://github.com/tidyverse/tidyr/pull/1070
if (.remove && quo_is_symbol(weights_quo)) {
out[[as_string(get_expr(weights_quo))]] <- NULL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[air] reported by reviewdog 🐶

Suggested change

Comment thread R/uncount.R
# Fixes #1583 - support for .data$column syntax
if (.remove) {
weights_expr <- get_expr(weights_quo)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[air] reported by reviewdog 🐶

Suggested change

Comment thread R/uncount.R
Comment on lines +56 to +57
} else if (is_call(weights_expr, "$", n = 2) &&
identical(weights_expr[[2]], sym(".data"))) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[air] reported by reviewdog 🐶

Suggested change
} else if (is_call(weights_expr, "$", n = 2) &&
identical(weights_expr[[2]], sym(".data"))) {
} else if (
is_call(weights_expr, "$", n = 2) &&
identical(weights_expr[[2]], sym(".data"))
) {

@mrv0for0vandeta mrv0for0vandeta marked this pull request as draft May 13, 2026 02:10
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.

1 participant