In fact I don't know how to make the nice border but I noticed dataframe does it ...

I only need the nice border for the matrix, but I don't know how to do it ?

Maybe I should ask how to make a nice border in a matrix ?

Regards

Henri


Le 15/10/2016 à 22:32, Milan Bouchet-Valat a écrit :
Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit :
Hi,
Is it possible to have a table with only the result ?
I don't want row /column names.
So why do you create a data frame? Isn't a Matrix enough?


Regards

using DataFrames
function iain_magic(n::Int)
     M = zeros(Int, n, n)
     for I = 1:n, J = 1:n
         @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1
     end
     return M
end
mm=iain_magic(3)
df=DataFrame(mm)

Reply via email to