-
Notifications
You must be signed in to change notification settings - Fork 979
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
melt adds a number to value.name when using patterns #1346
Comments
jaapwalhout
changed the title
melt add number to value.name when using patterns
melt adds a number to value.name when using patterns
Sep 21, 2015
Thanks @jaapwalhout, should be fixed now. Please verify. |
Tested: it works. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the
patterns
argument with one value column inmelt
a number (1) is added to the value name. A reproducible example:The following two
melt
operation should give the same output (but don't):The output of
names
:I expected that
rnk1
would have the same names asrnk2
The cause of this behavior is from this part of the
melt
function:As @arunsrinivasan mentioned in an SO chat, it could be solved by replacing
is.list(measure.vars)
withis.list(measure.vars) && length(measure.vars) > 1L)
.The text was updated successfully, but these errors were encountered: