starwars_dm {starwarsdb}R Documentation

Create a Star Wars Data Model Object

Description

Creates a dm object with the starwarsdb tables.

Usage

starwars_dm(configure_dm = TRUE, remote = FALSE)

starwars_dm_configure(dm)

Arguments

configure_dm

If TRUE (default) the returned dm object is completely configured with all of the primary and foreign keys. Set to FALSE if 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

Value

A dm object

Functions

See Also

dm::dm(), dm::dm_add_pk(), dm::dm_add_fk(), dm::dm_from_src()

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)
}


[Package starwarsdb version 0.1.2 Index]