Skip to content

Instantly share code, notes, and snippets.

@tony91782
Created July 18, 2011 12:20
Show Gist options
  • Save tony91782/1089351 to your computer and use it in GitHub Desktop.
Save tony91782/1089351 to your computer and use it in GitHub Desktop.
Bad idea for computing all diagonal-preserving second order principal minors
minors = NULL
for(i in 1:(nrow(mat)-1)){
start = i +1
for(j in start:nrow(mat)){
thisminor = det(mat[c(i,j),c(i,j)])
minors = c(minors, thisminor)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment