I have two columns of data like this enter image description here
and it will be a very long list, and i want to transfer it to two mode network matrix using R language, where first column is the names list (without repetition, because in raw data many names are repeated) and the row will be the activity (also without repetition), it will be something like this enter image description here