[R] Beginner help with retrieving frequency and transforming a matrix

2008-03-28 Thread Sean MacEachern
Hi All, Just hoping some one can give me a hand with a problem... I have a dataframe (DF) with about 5 million entries that looks something like the following: DF ID Cl Co BrdInd A AB AB 1 S-3 IND A BR_F BR_F01 1 0 0 2 S-3 IND A BR_F BR_F01 1 0 0 3 S-3 IND A BR_F BR_F01 1

Re: [R] Beginner help with retrieving frequency and transforming a matrix

2008-03-28 Thread Roland Rau
Hi Sean, is this roughly what you are looking for (please note that in the example data you provided there is only one level of ID given, no S-4, ...) ? DF ID Cl Co BrdInd A AB AB.1 frq 1 S-3 IND A BR_F BR_F01 1 00 1.0 2 S-3 IND A BR_F BR_F01 1 00 1.0 3 S-3 IND A