Skip to content

Instantly share code, notes, and snippets.

@tvladeck
Created February 9, 2017 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvladeck/9ae06907339773c47acac03c34df84fd to your computer and use it in GitHub Desktop.
Save tvladeck/9ae06907339773c47acac03c34df84fd to your computer and use it in GitHub Desktop.
function to calculate indexations
indexation <- function(A)
{
A / ((rowSums(A)/sum(rowSums(A))) %*%
t(colSums(A)/sum(colSums(A))) *
sum(A))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment