0
How can I order two different values of an x attribute, when they share the same value of a y attribute, on the same line? In R
Hi guys, I'va problem with my thesis work and I'm here to get help. I have to manage some data and I've decided to do it through R because there are a lot of data. To decrease the rows I want to perform this operation that I show you graphically: Tab |Attr x attr y| has to become |Attr x attr y| |b1 A | |b1,b2 A | |b2 A | Please help me, of course I'm using sql libraries. What could be the R alg code to solve this operation ? Thanks.
3 odpowiedzi
+ 1
Looks like you want to reshape your data:
reshape() (built-in function)
or
library("reshape")
might help
0
Did you try to make two tables filtering by "Attr x" and then merge (left.join) them by "Attr y" and then merge (unite) both "Attr x"?
0
Actually I think that the spread function apply on "Attr x" works in the same way