Number of Entries – R

The problem is that I have a large list of actors, and I need to count the number of times they have been involved in a conversation.

So each time an actor participates in a conversation, their name gets written down. So I have a really long list, with a few names, that repeat several times.

All I need to do is count them.

First, import their names into R


then convert that into a data frame


Then get the names and the number of times they repeat


But the output will still be all over the place, so the best way to order them is to create a matrix with them


Now we can write it to a CSV file so we can open it and arrange some stuff around.


This makes sure we have the “,” as the separators, no quotes, and no column names.
That’s all.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s