bgg_namestyle: Detect the namestyle of the data table

Description Usage Arguments Value Author(s) Examples

View source: R/bgg_tools.R

Description

Detects whether the dt data.table was created by a bggAPI object with 'pretty' or 'classic' names. Ends with the error if one of them cannot be unequivocally determined. This can be useful when working on a modified table that is no longer directly connected to any bggAPI object.

Usage

1

Arguments

dt

a data.table from data slot of a bggAPI object.

Value

A single string.

Author(s)

Jakub Bujnowicz bujnowiczgithub@gmail.com

Examples

1
2
3
4
5
6
7
8
gm <- bggGames$new(ids = 167791)
bgg_namestyle(gm$data)

gm$switch_namestyle("pretty")
bgg_namestyle(gm$data)

# Breaks
# bgg_namestyle(iris)

bggAnalytics documentation built on Sept. 24, 2021, 1:06 a.m.