starwars_dm: Create a Star Wars Data Model Object

Description Usage Arguments Value Functions See Also Examples

View source: R/dm.R

Description

Creates a dm object with the starwarsdb tables.

Usage

1
2
3
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

1
2
3
4
5
6
7
8
# 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)
}

starwarsdb documentation built on Nov. 8, 2020, 4:41 p.m.