View source: R/tabulate_pgnlog.R
cram_pgnlog | R Documentation |
tabulate_pgnlog()
The function tabulate_pgnlog()
takes a list of engine analyses for chess
games and condenses them into data frames for easier access.
cram_pgnlog(
pgnlog,
all_tags = FALSE,
custom_tags = NULL,
delete_blank_lines = TRUE
)
pgnlog |
A list of gamelogs from rbitr's |
all_tags |
(Default = |
custom_tags |
(Default = |
delete_blank_lines |
(Default = |
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.
A list of data frames containing condensed analyses of chess games.
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.
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.