Re: [R] about matrices merge and retrieve algorithm.

2011-01-22 Thread Petr Savicky
On Sat, Jan 22, 2011 at 12:13:35PM +0530, pratik wankhade wrote: I have a problem as follows: 1. If we have 3 matrices A,B,C and we merge them in a single matrix ABC by any method like addition , subtraction division,multiplication,etc 2. and then we want to retrieve original 3 matrices

[R] about matrices merge and retrieve algorithm.

2011-01-21 Thread pratik wankhade
I have a problem as follows: 1. If we have 3 matrices A,B,C and we merge them in a single matrix ABC by any method like addition , subtraction division,multiplication,etc 2. and then we want to retrieve original 3 matrices A,B,C from single ABC matrix What will be the algorithm?

[R] About the merge

2009-03-11 Thread Tammy Ma
hi, All. DateDtime Hour Min Second Rep App_dur 9 2006-02-22 14:36:11 14 36 11 4 1 10 2006-02-22 14:36:12 14 36 12 3 86 11 2006-02-22 14:37:38 14 37 38 0 58 14 2006-02-22 14:38:36 14 38 36 3 1 15 2006-02-22 14:38:37 14 38

Re: [R] About the merge

2009-03-11 Thread William Dunlap
You can assign a group number to each run of identical values of 'Rep' with firstInRun - with(data, c(TRUE, Rep[-1]!=Rep[-length(Rep)])) group - cumsum(firstInRun) where 'data' is your data.frame's name. Once you've assigned the runs to groups then you can use, e.g., sapply(split()) to