plot_tree_move: Plot tree for a given tree move table

Description Usage Arguments Value Examples

View source: R/plot_tree_move.R

Description

Plot tree (barplot percentages) for a given tree move data frame.

Usage

1
plot_tree_move(tr, main = "", add.lines = T, add.labels = T)

Arguments

tr

data frame containg tree move

main

string for main title, default is ""

add.lines

boolean (default TRUE) add weighted mean lines?

add.labels

boolean (default TRUE) add labels?

Value

Barplot with white scores, draws percent and black scores.

Examples

1
2
3
4
5
6
7
8
f <- system.file("extdata", "Kasparov.gz", package = "bigchess")
con <- gzfile(f,encoding = "latin1")
df <- read.pgn(con,quiet = TRUE,stat.moves = FALSE)
tr <- tree_move(subset(df,W1=="e4"),"B1")
plot_tree_move(tr,"1. e4 ... ?")
# Plot tree move openings in aggregated data
tr <- tree_move(FirstTwoMoves,"W1")
plot_tree_move(tr,paste0("1. ... ?\n",sum(FirstTwoMoves$Freq)," total games"))

rosawojciech/bigchess documentation built on Jan. 19, 2021, 5:54 a.m.