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

move from warning to breaking change in melt/dcast #6629

Open
tdhock opened this issue Nov 29, 2024 · 0 comments
Open

move from warning to breaking change in melt/dcast #6629

tdhock opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
breaking-change issues whose solution would require breaking existing behavior consistency reshape dcast melt
Milestone

Comments

@tdhock
Copy link
Member

tdhock commented Nov 29, 2024

v1.16.0 NEWS says that two new warnings may be changed in a future release into backwards-incompatible changes, for consistency:

  1. ?melt has long documented that the returned variable column should contain integer column indices when measure.vars is a list, but when the list length is 1, variable is actually a character column name, which is inconsistent with the documentation, #5209. To increase consistency in the next release, we plan to change variable to integer, so users who were relying on this behavior should change measure.vars=list("col_name") (variable currently is a column name but will be a column index/integer after this planned change) to measure.vars="col_name" (variable is column name before and after the planned change). For now, relying on this undocumented behavior throws a new warning.

  2. ?dcast has always required fun.aggregate to return a single value, and when fill=NULL, dcast would indeed error if a vector with length!=1 was returned, but an undefined result was silently returned for non-NULL fill. Now dcast() will additionally warn that this is undefined behavior when fill is not NULL, #6032. In particular, this will warn for fun.aggregate=identity, which was observed in several revdeps. We may change this to an error in a future release, so revdeps should fix their code as soon as possible. Thanks to @tdhock for the PR, and @MichaelChirico for analysis of GitHub revdeps.

@tdhock tdhock added this to the 1.17.0 milestone Nov 29, 2024
@tdhock tdhock self-assigned this Nov 29, 2024
@tdhock tdhock added consistency breaking-change issues whose solution would require breaking existing behavior reshape dcast melt labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change issues whose solution would require breaking existing behavior consistency reshape dcast melt
Projects
None yet
Development

No branches or pull requests

1 participant