download_graph: Download KGS rank graph

View source: R/downloader.R

download_graphR Documentation

Download KGS rank graph

Description

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.

Usage

download_graph(id, dst = tempfile(), lang = "en", country = "US",
  method = "libcurl", ...)

Arguments

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 download.file for details

...

optional arguments for download.file other than method and mode

Details

Default setting downloads the English version. Another good option is to set lang='ja' and country='JP', which downloads the Japanese version.

Value

path to the saved file

See Also

download.file

Examples

## Not run: 
f <- download_graph('twoeye')
p <- png::readPNG(f)
plot.new()
rasterImage(p,0,0,1,1)
## End(Not run)

kota7/kgschart-r documentation built on Aug. 13, 2022, 11:31 a.m.