friends: top partners

View source: R/friends.R

friendsR Documentation

top partners

Description

top partners

Usage

friends(
  x,
  criterion = NULL,
  indexcols = "DSI",
  IDcols = c("i1", "i2"),
  tableout = FALSE
)

Arguments

x

output from DSI

criterion

either one of "1sd", "2sd", "10perc", "5perc", or numeric

indexcols

character, the column that contains the index of interest

IDcols

character of length 2, column names of the two dyad members

tableout

logical by default FALSE, if TRUE and a group level criterion was selected (not numeric), a table with the dyads in descending order of their dyadic index is returned

Details

if the criterion is one of "1sd", "2sd", "10perc", "5perc" the cutoff is considered across all dyads in the data set. If the criterion is numeric, then the x top partners of each individual will be returned regardless of absolute values of the index. If criterion=NULL, its default, all possible dyads will be returned sorted by size within individual.

Value

a list

Examples

data(dataset3)
dsi <- DSI(dataset3$dataseq, presence=dataset3$presence, ot.source=dataset3$ot,
onlyfocaldyads = FALSE)
friends(dsi, "2sd")
friends(dsi, "2sd", tableout = TRUE)
friends(dsi, 3)

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