readSudoku | R Documentation |
Reads a file containing a Sudoku grid (a 9x9 matrix).
readSudoku(fn, map)
fn |
A filename. |
map |
Vector of unique puzzle elements (possibly longer than
necessary). The default is |
The input file should look like this:
-6-1-4-5- --83-56-- 2-------1 8--4-7--6 --6---3-- 7--9-1--4 5-------2 --72-69-- -4-5-8-7-
Blank cells can be indicated with any character not in "map", such as the '-' used here.
A numeric matrix (usually 9x9).
David E. Brahm <brahm@alum.mit.edu>
z <- readSudoku(system.file("puz1.txt", package="sudoku"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.