You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The newly promoted rename function in plry 1.5 does not map the new names correctly. A renaming of the requested columns to rename is made, but not to the correct new names
Reproducible code
This code example is drawn from coord-cartesian-flipped.r in ggplot2 which exposed the bug.
Inside the ggplot2 code, rename uses plyr::rename, while at the command prompt, rename uses reshape::rename. This is why the explicit package notation is needed in the function calls.
Session info
R version 2.13.0 RC (2011-04-10 r55401)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] ggplot2_0.8.9 proto_0.3-9.1 reshape_0.8.4 plyr_1.5
loaded via a namespace (and not attached):
[1] tools_2.13.0
The text was updated successfully, but these errors were encountered:
Summary
The newly promoted rename function in plry 1.5 does not map the new names correctly. A renaming of the requested columns to rename is made, but not to the correct new names
Reproducible code
This code example is drawn from coord-cartesian-flipped.r in ggplot2 which exposed the bug.
Actual results
Expected results
Note that this is the result given by reshape::rename with the same arguments.
Source of problem
The new names that are given are pulled from the new names in the order they are listed, not in the order that they match the old names.
To fix the problem, in plyr::reshape the line
should be
Workarounds
None known.
Caveats
Inside the ggplot2 code, rename uses plyr::rename, while at the command prompt, rename uses reshape::rename. This is why the explicit package notation is needed in the function calls.
Session info
loaded via a namespace (and not attached):
[1] tools_2.13.0
The text was updated successfully, but these errors were encountered: