read_game: Read a game from a PGN

Description Usage Arguments Value

View source: R/pgn.R

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

1
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


curso-r/chess documentation built on Dec. 19, 2021, 7:04 p.m.