{"name":"gist: 914428","desc":"Pairwise distance CPG, polarization, or segregation measure","actor":"dsparks","url":"https://gist.github.com/914428","snippet":"Polarizer <- function(group, data){\n  SameGroup <- as.matrix(dist(as.numeric(as.factor(group)))) == 0\n  diag(SameParty) <- NA","actor_gravatar":"2d0d981936042d6cea0f71ecdb187b1f","action":"update"}