bgg_merge: Merge data from two bggAPI objects

View source: R/bgg_tools.R

bgg_mergeR Documentation

Merge data from two bggAPI objects

Description

This allows for merging data from two bggAPI objects. Namestyle is inherited from x and columns from y$data are added to x$data (unless they are already there).

Usage

bgg_merge(x, y, ...)

Arguments

x, y

objects that inherit from bggAPI class.

...

other arguments passed to data.table::merge().

Value

A data.table with variables from both x and y.

Examples


sr <- bggSearch$new("Terraforming Mars")
gm <- bggGames$new(sr$ids)

gm$expand(c("name", "type", "rank"))

bgg_merge(sr, gm)


JakubBujnowicz/bggAnalytics documentation built on April 13, 2025, 7:27 a.m.