stat_moves: Extract statistics of moves

Description Usage Arguments Value Examples

View source: R/stat_moves.R

Description

Extract statistics of moves (counts figure moves) from movetext vector into data frame

Usage

1
stat_moves(movetext, sides = "both")

Arguments

movetext

movetext string (or string vector). The standard English values are required: pawn = "P" (often not used), knight = "N", bishop = "B", rook = "R", queen = "Q", and king = "K".

sides

"both" (default),"white" or "black"

Value

Data frame containing moves count statistics for white and for black and total.

Examples

1
stat_moves("1. e4 e5 2. Nf3 Nf5 3. d5 ")

Example output

  W_B_moves W_K_moves W_N_moves W_O_moves W_Q_moves W_R_moves B_B_moves
1         0         0         1         0         0         0         0
  B_K_moves B_N_moves B_O_moves B_Q_moves B_R_moves B_moves K_moves N_moves
1         0         1         0         0         0       0       0       2
  O_moves Q_moves R_moves
1       0       0       0

bigchess documentation built on Aug. 5, 2020, 5:09 p.m.