| .mergeactrec | R Documentation |
merge actor and recipient (independent of focal)
.mergeactrec(x)
x |
a data set with behavioural data, including actor and recipient or giver/receiver columns (in addition to focal column) |
The point of this function is to generate a data set that can be handled in the same way, regardless of whether the data are in focal/partner or focal/actor/receiver format.
same as x but with the additional column $XPARTNER. If there was an actor/receiver column pair in the original data, this new column will be the non-focal of the two. Additionally, a column $focwasact is added, which indicates whether the focal was the actor (TRUE) or the recipient (FALSE).
For consistency and easier handling in the CSI function, also a $XFOCAL column is generated which is identical to the original focal column.
If there is only a partner column in the data set, the same new columns will be generated (again for easier handling, i.e. consistency in the CSI function). The $focwasact will be all TRUE in that case...
data(dataset3) head(socialindices2:::.mergeactrec(dataset3$dataseq))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.