Skip to content

Instantly share code, notes, and snippets.

@taroyabuki
Created February 11, 2013 14:02
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 taroyabuki/4754576 to your computer and use it in GitHub Desktop.
Save taroyabuki/4754576 to your computer and use it in GitHub Desktop.
install.packages("RCurl")
install.packages("lsa")
library(RCurl)
url <- getURL("https://gist.github.com/taroyabuki/4749183/raw/ffc84dbc4a3499ddef4a8c4f689b56c2948225bd/clustering_test_data.csv", ssl.verifypeer = F)
data <- read.csv(textConnection(url), header = F)
library(lsa)
d <- dist(1 - cosine(t(as.matrix(data))))
hr <- hclust(d, method = "complete")
plot(hr, hang = -0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment