Package 'convlog'

Title: Read Mahjong Logs From 'tenhou.net/6' Format
Description: Offers wrappers for the 'convlog' crate from 'mjai-reviewer' <https://github.com/Equim-chan/mjai-reviewer> that can directly read mahjong logs from 'tenhou.net/6' format into R lists.
Authors: Akiru Kato [aut, cre], Equim chan [cph] (Author of the 'convlog' crate)
Maintainer: Akiru Kato <[email protected]>
License: Apache License (>= 2)
Version: 0.0.2
Built: 2024-11-16 08:25:08 UTC
Source: https://github.com/paithiov909/convlog

Help Index


Read and parse 'tenhou.net/6' format log

Description

Read and parse 'tenhou.net/6' format JSON files while transforming them into 'mjai' format.

Usage

read_tenhou6(file)

read_mjlog(logid)

Arguments

file

A character vector. This argument is simply passed to scan(), so each element can be either a path to a local file or a URL.

logid

A character vector that represents identifiers of log files.

Details

read_mjlog() internally reads remote JSON files corresponding to logid, and converts them into the same format as read_tenhou6().

Note that read_mjlog() is rate-limited to 2 requests per second to access the server.

Value

A named list that contains following elements:

  • game_info: A tibble that contains information about the games.

  • round_info: A tibble that contains information about rounds.

  • paifu: A tibble that represents paifu.