The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Title: SGF (Smart Game File) File Format Import
Version: 1.0.0
Date: 2021-07-13
Author: Brad Cable
Maintainer: Brad Cable <brad@bcable.net>
Description: Import SGF (Smart Game File) into R.
Imports: ggplot2, methods, png, stringi, stringr, utils
License: MIT + file LICENSE
NeedsCompilation: no
Packaged: 2021-07-14 05:37:17 UTC; lister
Repository: CRAN
Date/Publication: 2021-07-15 07:20:02 UTC

R package that imports SGF (Smart Game File). Used for Go and other board games

Description

Imports SGF (Smart Game File)

Usage

loadSGF(filename, game.number=1)
playerCard(player_names, sgf_paths)
boardHeatMap(data)
getColorPalette(count)
SGFGame(moves)

Arguments

filename

Path to SGF filename

game.number

Value to return for Game.Number, useful for multiple game loading into the same data.frame

player_names

Player name (or player names as vector) to return results for

sgf_paths

Path to SGFs or directories that contain SGFs (or paths as vector)

data

Aggregate data.frame with X, Y, and Count columns representing the Go/Baduk board

moves

moves returned by playerCard()

count

count of graded levels for getColorPalette()

Value

loadSGF() returns a data.frame playerCard() returns a data.frame boardHeatMap() returns a ggplot2 graphics object getColorPalette() returns a list of colors based on the count provided for the default Rsgf Go theme SGFGame() returns an RC/S4 object

Author(s)

Brad Cable

Examples

# loading lots of SGFs
library(Rsgf)
test_data_dir <- system.file("sgf", package="Rsgf")
player_data <- Rsgf::playerCard("Honinbo Shusaku", test_data_dir)

# Simple aggregation for heatmap:
agg_games <- aggregate(Game.Number ~ x + y, data=player_data, FUN=length)
names(agg_games) <- c("x", "y", "Count")
agg_games$Count <- as.factor(agg_games$Count)

# Graph heatmap
Rsgf::boardHeatMap(agg_games)

# Extended Player Card and Heatmap Examples
# https://bcable.net/analysis-Rsgf_period_cards.html
# https://bcable.net/analysis-Rsgf_moves_anim.html
# https://bcable.net/analysis-Rsgf_player_card.html

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.