Yes - actually first thing I tried, but kept getting this error:
LoadError: MethodError: no method matching cor(::DataFrame)
so thought I am just not understanding that function… but your toy example works fine for me as well… hmm… wonder why it’s not happy with the matrix I tried passing it… i wonder if it’s because when i use hcat to put it together it adds a Row column?
Ah yes sorry I cheated a bit above which probably added to your confusion. rand(10, 5) creates a matrix, which is what cor requires. A DataFrame isn’t an AbstractMatrix but as you found can be cast as one by just calling the Matrix constructor.