Skip to content

Instantly share code, notes, and snippets.

View famibelle's full-sized avatar

Famibelle Médhi famibelle

View GitHub Profile
HelloWord <- function(Text) {
print(Text)
}
HelloWord("Hello World")
#Run hclust
hc <- hclust(dist(USArrests[1:40,]), "ave")
#Function for extracting nodes and links
extractGraph<-function(hc){
n<-length(hc$order)
m<-hc$merge
links<-data.frame(source=as.numeric(), target=as.numeric(), value=as.numeric())