Skip to content

Added error checking to melt_check to ensure unique measure.vars#66

Open
jmacdon wants to merge 1 commit intohadley:masterfrom
jmacdon:master
Open

Added error checking to melt_check to ensure unique measure.vars#66
jmacdon wants to merge 1 commit intohadley:masterfrom
jmacdon:master

Conversation

@jmacdon
Copy link
Copy Markdown

@jmacdon jmacdon commented Apr 23, 2015

Got caught by this today - identical measure.vars will silently recycle the first column.

z <- data.frame(A = letters[1:5], this = 1:5, that = 6:10, this = 11:15, that = 16:20, check.names = FALSE)
melt(z)
Using A as id variables
A variable value
1 a this 1
2 b this 2
3 c this 3
4 d this 4
5 e this 5
6 a that 6
7 b that 7
8 c that 8
9 d that 9
10 e that 10
11 a this 1
12 b this 2
13 c this 3
14 d this 4
15 e this 5
16 a that 6
17 b that 7
18 c that 8
19 d that 9
20 e that 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