cram_pgnlog: Deprecated alias for 'tabulate_pgnlog()'

View source: R/tabulate_pgnlog.R

cram_pgnlogR Documentation

Deprecated alias for tabulate_pgnlog()

Description

The function tabulate_pgnlog() takes a list of engine analyses for chess games and condenses them into data frames for easier access.

Usage

cram_pgnlog(
  pgnlog,
  all_tags = FALSE,
  custom_tags = NULL,
  delete_blank_lines = TRUE
)

Arguments

pgnlog

A list of gamelogs from rbitr's evaluate_pgn() function.

all_tags

(Default = FALSE) A Boolean. Setting all_tags = TRUE will search for all of the tags listed in the UCI protocol.

custom_tags

(Default = NULL) An optional character vector of custom tag names.

delete_blank_lines

(Default = TRUE) A Boolean. Setting this value to FALSE will leave blank rows/columns intact.

Details

tabulate_pgnlog() condenses analyses from a UCI-compatible chess engine that have been produced using the evaluate_pgn() function.

tabulate_pgnlog() is a wrapper for tabulate_gamelog() that loops over each game analysis in the pgnlog and for each game creates a data frame containing the condensed analysis data. Each data frame will have a column named game_number showing which game in the pgnlog the data came from. The pgnlog parameter should contain output from the evaluate_pgn() function. The remaining parameters are passed to tabulate_gamelog(). See the documentation for tabulate_positionlog() and tabulate_gamelog() for details.

Value

A list of data frames containing condensed analyses of chess games.

Note

tabulate_pgnlog() does not change the class of the data it returns. Since the pgnlog contains character data, columns originating from the pgnlog will have class character. However, numeric indices added by tabulate_pgnlog() (e.g., position and game_number) will have class integer.

See Also

The 'tabulate' functions tabulate analysis logs into data frames.

  • tabulate_positionlog() for condensing analysis of one position.

  • tabulate_gamelog() for condensing analysis of one game.

  • tabulate_pgnlog() for condensing analysis of an entire pgn file.

The 'parse' functions extract specific data from analysis logs.

  • parse_gamelog() for extracting data from one evaluated game.

  • parse_pgnlog() for extracting data from games in a pgn.

The 'evaluate' functions produce analysis logs.

  • evaluate_position() for analyzing chess positions.

  • evaluate_game() for analyzing individual games.

  • evaluate_pgn() for evaluating all the games in a PGN file.

Examples

pgnlog <- list(list(c(
"Stockfish 13 by the Stockfish developers (see AUTHORS file)",
"readyok",
"info string NNUE evaluation using nn-62ef826d1a6d.nnue enabled",
"info depth 1 seldepth 1 multipv 1 score cp 146 nodes 30 nps 30000 tbhits 0 time 1 pv d2d4",
"bestmove d2d4"
)))
tabulate_pgnlog(pgnlog)

dryguy/rbitr documentation built on Oct. 15, 2024, 6:18 a.m.