I tried cast and melt in reshape package, but still can't convert this data
frame m

m
     [,1] [,2]
[1,] "A"  "1"
[2,] "A"  "2"
[3,] "B"  "3"
to this form.

m1
     [,1] [,2]
[1,] "A"  "B"
[2,] "1"  "3"
[3,] "2"  NA
Please help.

	[[alternative HTML version deleted]]


