smatrix | R Documentation |
Function to obtain the square matrix contained dyadic frequency of dominance-related behaviors (actor and reactor).
smatrix(x)
x |
Replacement or agonistic interaction data table. |
The fuction smatrix is only applied for data set with columns named as follows: actor and reactor. The function form a square matrix, in which the number of "n" actors is also the number of "n" reactors.
Sociomatrix
Julia P. S. Valente, Matheus Deniz, Karolini T. de Sousa.
x <- data.frame(actor = c(6,3,5,4,2,1,3,5,8,6,9,3,2,1,1), reactor = c(2,6,3,5,4,2,1,3,5,1,6,4,3,2,5)) sociomatrix <- smatrix(x) print(sociomatrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.