| Title: | KGS Rank Graph Parser |
|---|---|
| Description: | Restore underlining numeric data from rating history graph of KGS (an online platform of the game of go, <http://www.gokgs.com/>). A shiny application is also provided. |
| Authors: | Kota Mori [aut, cre] |
| Maintainer: | Kota Mori <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.3.5 |
| Built: | 2026-06-01 08:01:09 UTC |
| Source: | https://github.com/cran/kgschart |
Access KGS server and download the latest rank graph of the specified player. Requires internet connection. Returns the path to the downloaded file if succeeded.
download_graph(id, dst = tempfile(), lang = "en", country = "US", method = "libcurl", ...)download_graph(id, dst = tempfile(), lang = "en", country = "US", method = "libcurl", ...)
id |
KGS ID |
dst |
destination file path or directory |
lang |
language code, a lower case character of length 2 |
country |
country code, an upper case character of length 2 |
method |
method to be used for downloading files. See |
... |
optional arguments for |
Default setting downloads the English version. Another good option is
to set lang='ja' and country='JP', which downloads the Japanese version.
path to the saved file
## Not run: f <- download_graph('twoeye') p <- png::readPNG(f) plot.new() rasterImage(p,0,0,1,1) ## End(Not run)## Not run: f <- download_graph('twoeye') p <- png::readPNG(f) plot.new() rasterImage(p,0,0,1,1) ## End(Not run)
Parse a KGS rank graph and recover undelining numeric data.
kgschart(src, keep_image = FALSE, ...)kgschart(src, keep_image = FALSE, ...)
src |
png file name |
keep_image |
if |
... |
other arguments for |
kgschart class object
x <- kgschart(system.file("extdata/leela-ja_JP.png", package = "kgschart")) head(x$data) ## Not run: plot(x) ## End(Not run)x <- kgschart(system.file("extdata/leela-ja_JP.png", package = "kgschart")) head(x$data) ## Not run: plot(x) ## End(Not run)
Start "KGS Rank Graph Parser" applicaiton.
kgschart_app(...)kgschart_app(...)
... |
optional arguments for |
## Not run: kgschart_app() ## End(Not run)## Not run: kgschart_app() ## End(Not run)
Plot data or image
## S3 method for class 'kgschart' plot(x, y = NULL, image = FALSE, separate = FALSE, ...)## S3 method for class 'kgschart' plot(x, y = NULL, image = FALSE, separate = FALSE, ...)
x |
|
y |
not in use |
image |
if |
separate |
if |
... |
not in use |
gtable object if image and separate are both TRUE,
ggplot object otherwise
Display basic information
## S3 method for class 'kgschart' print(x, ...)## S3 method for class 'kgschart' print(x, ...)
x |
|
... |
not in use |
Nothing