I have a dataframe from an experiment with the stimuli on the columns and responses (in the form of one word) from participants in the rows. The dataframe is filled with counts of how many times that response was given for a stimulus. I looks like this:
S | angry | happy | sad | excited | frustrated |
---|---|---|---|---|---|
a | 10 | 1 | 0 | 0 | 5 |
b | 1 | 0 | 0 | 15 | 0 |
c | 13 | 0 | 5 | 0 | 0 |
d | 10 | 0 | 0 | 0 | 6 |
I wanted to visualize this data with a network where the simuli (nodes) are linked if they have been given the same response, and the links are stronger if that response have been given many times.
I have already created a network from an adjacency matrix with igraph and ggnet with the stimuli as col names and row names, but I loose some info there (which response and how often).
Any ways I could do it??