as.sudoku {sudokuAlt} | R Documentation |
Generic Sudoku Game Constructor
Description
Construct a Sudoku Game Object
Usage
as.sudoku(x, ...)
Arguments
x |
an n^2 x n^2 matrix object to represent the game |
... |
Other additional arguments (currently ignored) |
Details
Coerce an object to one that can be used as a sudoku game. IMPORTANT: games are represented as n^2xn^2 character matrices, using 1-9 for n=2 or 3, and LETTERS[1:(n^2)] for n = 4 or 5.
Value
An object of class 'sudoku'
Author(s)
Bill Venables
Examples
M <- as.sudoku(matrix("", 16, 16))
M[1:4, 1:4] <- matrix(LETTERS[1:16], 4, 4, byrow = TRUE)
sM <- solve(M)
plot(sM)
[Package sudokuAlt version 0.2-1 Index]