Re: [R] Obtaining OLAP cubes using R

2011-06-15 Thread Saravanan
Hi Eric, Your solution looks very close to my own. I also use expand.grid to get the cross product though. If I find an alternate way, I will send out my solution. Thanks a lot for your suggestion ! Regards, Saravanan On 06/15/2011 09:34 AM, Eric Lecoutre wrote: > Ho Saravana, > I did have ne

Re: [R] Obtaining OLAP cubes using R

2011-06-15 Thread Eric Lecoutre
Ho Saravana, I did have nearly the same issue some months ago -- you will find below a good starting point. I am quite sure there is a better way to achieve it or with better code, but this should work! Kind regards, Eric - generateCube <- function(x,simplify=TRUE,onlyComb=FALSE,...){

[R] Obtaining OLAP cubes using R

2011-06-14 Thread Saravanan
Hello All, I have a dataset and I wish to obtain all possible data cuboids from it using R . For eg if my data frame is : ABC 111 121 221 The output intended is : A=1 A=2 B=1 B=2 C=1 A=1,B=1 A=1,B=2 A=2,B=2 A=1,C=1 A=2,C=1 B=1,C=1 B=2,C=1 A=1,B=1,C=1 A=1,B=2,C=