magic.8 {magic}R Documentation

Regular magic squares of order 8

Description

Returns all 90 regular magic squares of order 8

Usage

magic.8(...)

Arguments

... ignored

Value

Returns an array of dimensions c(8,8,90) of which each slice is an 8-by-8 magic square.

Author(s)

Robin K. S. Hankin

References

http://www.grogono.com/magic/index.php

Examples

h <- magic.8()
h[,,1]

f <- function(i){is.magic(h[,,i])}
stopifnot(all(sapply(1:90,f)))

[Package Contents]