smatrix {socialh} | R Documentation |
Sociomatrix
Description
Function to obtain the square matrix contained dyadic frequency of dominance-related behaviors (actor and reactor).
Usage
smatrix(x)
Arguments
x |
Replacement or agonistic interaction data table. |
Details
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.
Value
Sociomatrix
Author(s)
Julia P. S. Valente, Matheus Deniz, Karolini T. de Sousa.
Examples
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)
[Package socialh version 0.1.1 Index]