Skip to content

creation of a matrix

2 messages · Erika Ahl, jim holtman

#
Hi all,

I have a relative large amount (several thousand rows, but a small
amount of unique objects) of data in a format like this:

1	text_string
1	text_string
1	text_string
2	text_string
2	text_string
3	text_string
3	text_string
3	text_string
3	text_string
3	text_string
.
.
.
n	text_string

I want to create an n x p matrix, n objects (=40) and p unique text
strings. Nij is number of occurrences of a text string j in object i.


What is the most efficient way of creating this matrix?

Best regards,

Erika Ahl