two-dimensional frequency question

D

Demosthenes

i have another peculiar question. Say you have the following data:
A C
B D
B D
B E
A C
B E
A E
B D
B E
A C
B D

and you want to count how many times an "A C" is followed by a "B D," and
how many. So, output for the above would be:
1: 1
2: 1

i think the way to do it would be to sum over a frequency, but i can't
figure out how to set the bin array the way i need it. the bins would have
to start at "A C" and reset after any "A <>C"

thoughts? maybe a way to do it that way or a better way entirely?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top