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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to