search for: correlative_group

Displaying 1 result from an estimated 1 matches for "correlative_group".

2011 Feb 16
1
id number by group and correlative
Hello everyone, I am new in R and I am trying to create a id number (a correlative sequence of numbers) by group, and a correlative sequence of numbers inside each group (my idea is to get statistics by group without having to aggregate the database). Here an example: group id_group correlative_group A 1 1 A 1 2 A 1 3 A 1 4 B 2 1 B 2 2 B 2 3 C 3 1 C 3 2 C 3 3 C 3 4 C 3 5 Unfortunately, I have been able to find an explicit lag function to get id_group (I know I can get it using aggregate and merge but I'm just wondering if there is another way to do it). With regar...