Creates a dm object with the starwarsdb tables.
Arguments
- configure_dm
If
TRUE(default) the returned dm object is completely configured with all of the primary and foreign keys. Set toFALSEif you want to practice configuring the dm object yourself.- remote
If
TRUE, uses the internal DuckDB database rather than local tables, which is the default.- dm
A dm object with the starwarsdb tables
Functions
starwars_dm_configure(): Configure the starwars dm object with primary and foreign keys and colors.
Examples
# If the {dm} package is installed...
if (requireNamespace("dm", quietly = TRUE)) {
# Create a full starwars {dm} object from local tables
starwars_dm(remote = TRUE)
# Create a base starwars {dm} object from remote tables wihout keys
starwars_dm(configure_dm = FALSE, remote = TRUE)
}
#> ── Table source ────────────────────────────────────────────────────────────────
#> src: DuckDB v1.3.2 [unknown@Linux 6.11.0-1018-azure:R 4.5.1/:memory:]
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `films`, `films_people`, `films_planets`, `films_vehicles`, `people`, … (9 total)
#> Columns: 58
#> Primary keys: 0
#> Foreign keys: 0