read.cubesolve: Read Cube Solving Reconstructions

Description Usage Arguments Details Value See Also Examples

Description

Reads cube solving scrambles and solutions for the cube solves website.

Usage

1
read.cubesolve(n, warn = FALSE)

Arguments

n

A single integer n giving the id for the solve.

warn

If FALSE, an error is returned when the id does not exist. If TRUE, a warning is given.

Details

The function reads from the html source of the www.cubesolv.es website, and may fail if the website subsequently changes.

Round brackets immediately followed by any single digit are expanded upon reading, for example (R U)4 becomes R U R U R U R U. All other round brackets are removed. Commutator and conjugate notation is not implemented, so square brackets cannot be used and a warning is given if they are found.

The website does not have automated checking and therefore a typographic error may lead to non-valid moves (or cubes that do not solve). This most commonly occurs when the space between two valid moves is accidentally omitted.

Value

A list containing the scramble, solution and description. The scramble and solution items are character vectors of moves. The description is a character string. If the scramble or solution (or both) is missing, then length zero vectors are returned for these items.

See Also

getMovesCube, invMoves, is.solved, move

Examples

1
2
3
4
## Not run: cho <- read.cubesolve(4995)
## Not run: aCube <- getMovesCube(cho$scramble)
## Not run: mv <- cho$solution
## Not run: is.solved(move(aCube, mv))

cubing documentation built on May 2, 2019, 10:16 a.m.