% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_statistics.R
\name{number_ties}
\alias{number_ties}
\title{Same pairs of individuals in a partition}
\usage{
number_ties(partition, dyadic_attribute, stat)
}
\arguments{
\item{partition}{A partition (vector)}

\item{dyadic_attribute}{A matrix containing the values of the attribute}

\item{stat}{The statistic to compute : 'avg_pergroup' for the average per group , 'sum_pergroup' for the sum, 'sum_perind' and 'avg_perind' for the number of ties per individuals
each individual has in its group.}
}
\value{
The statisic chosen in stat
}
\description{
This function computes the number of ties.
}
\examples{
p <- c(1,2,2,3,3,4)
v <- c(0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0)
at <- matrix(v,6,6, byrow = TRUE)
number_ties(p,at,'avg_pergroup')
}
