dot-mergeactrec: merge actor and recipient

.mergeactrecR Documentation

merge actor and recipient

Description

merge actor and recipient (independent of focal)

Usage

.mergeactrec(x)

Arguments

x

a data set with behavioural data, including actor and recipient or giver/receiver columns (in addition to focal column)

Details

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.

Value

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...

Examples

data(dataset3)
head(socialindices2:::.mergeactrec(dataset3$dataseq))

gobbios/socialindices documentation built on Feb. 14, 2023, 3:56 p.m.