I have a data as follows and I want to convert it to transaction format at Rstudio.Please guide me
ID P1 P2 P3 ....... p265 ID TRA
1 0 1 1 ....... 0 1 {P2,p3,....}
2 1 1 0 ....... 1 2 {P1,P2,...,P265}
3 0 0 1 ....... 1 3 {p3,...,p265}
. . . . . . .
. . . . . . .
. . . . . . .
1000 1 0 1 ....... 0 1000 {p1,p3,...}