Returns TRUE if and only if sum(vec)==magic.constant(n,d=d))
TRUE
sum(vec)==magic.constant(n,d=d))
is.ok(vec, n=length(vec), d=2)
Vector to be tested
Order of square or hypercube. Default assumes order is equal to length of vec
vec
Dimension of square or hypercube. Default of 2 corresponds to a square
# NOT RUN { is.ok(magic(5)[1,]) # }
Run the code above in your browser using DataCamp Workspace