On Wed, 5 Jan 2005 [EMAIL PROTECTED] wrote:

Dear list,

I have a dataset as follow and I would like to count the frequencies for
the combination of the two variables (f1 and f2)  for each id. I know it is
should be straight forward, but I just don't know how to do it in R. Here
is the SAS code I will use to get the output I want :

table() will count frequencies, and interaction() will create a variable with all combinations of a set of variables, so something like


table(interaction(f1,f2))

        -thomas

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to