Skip to content

Instantly share code, notes, and snippets.

@lgautier
Created December 27, 2012 14:56
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 lgautier/4388894 to your computer and use it in GitHub Desktop.
Save lgautier/4388894 to your computer and use it in GitHub Desktop.
Hierarchical clustering with the Julia-R bridge
require("Rif")
using Rif
initr()
m = R("matrix(rnorm(100), nrow=20)")
# A Julia matrix mj of type (Array{Float64, 2}) could
# be used with
# m = RArray{Float64,2}(mj)
d = call(R("dist"), [m])
hc = call(R("hclust"), [d])
call(R("plot"), [hc],
["sub"=>cR(""), "xlab"=>cR("")])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment