Learn R Programming

chess (version 1.0.1)

read_game: Read a game from a PGN

Description

Read a .pgn file with one or more annotated games; if there is more than 1 game in the file, a list is returned (which you can access with [[[()]). Some sample .pgn files are included in the package. See vignette("games") for more information.

Usage

read_game(file, n_max = Inf)

Arguments

file

File or connection to read from

n_max

Maximum number of games to read

Value

A game node or list of game nodes