Skip to content

Instantly share code, notes, and snippets.

@chasemc
Last active July 5, 2018 23:15
Show Gist options
  • Save chasemc/a53715ef026e8637ac10f8d5e1b06804 to your computer and use it in GitHub Desktop.
Save chasemc/a53715ef026e8637ac10f8d5e1b06804 to your computer and use it in GitHub Desktop.
fast pvclust
# library(wordspace)
# library(pvclust)
# largeMatrix is a matrix, where rows are samples and columns are variables
cosineDistanceFunction <- function(x) wordspace::dist.matrix(x, method = "cosine", as.dist = TRUE)
results <- pvclust(largeMatrix, method.dist = cosineDistanceFunction, nboot=1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment