Just found 'ngCMatrix' class, it must be the way to go?



---------------------------------------------
Message: 47Date: Mon, 20 Dec 2010 17:41:20 +1100
From: Kohleth Chia <kohleth@gmail.com>
To: r-help@r-project.org
Subject: [R] package "arules" - 'transpose' of the transactions
Message-ID:
       <AANLkTimmhuJ+GnThVJVT8yoMF3C5sqorkXCVGb3UT7mc@mail.gmail.com<AANLkTimmhuJ%2BGnThVJVT8yoMF3C5sqorkXCVGb3UT7mc@mail.gmail.com>
>
Content-Type: text/plain

Suppose this is my list of transactions:



set.seed(200)

3)
tran=random.transactions(100,

inspect(tran)

 items    transactionID
1 {item80}        trans1
2 {item8,
  item20}        trans2
3 {item28}        trans3



I want to get the 'transpose' of the data, i.e.

 transactionID  items
1 {trans2}        item8
2 {trans2}        item20
3 {trans3}        item28
4 {trans1}        item80



I tried converting tran into a matrix, then transpose it, then convert it
back to transactions. But my dataset is actually very very large, so I
wonder if there is any faster method?

Thanks

--
KC

       [[alternative HTML version deleted]]

	[[alternative HTML version deleted]]

