Learn R Programming

starwarsdb (version 0.1.2)

starwars_dm: 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

  • starwars_dm_configure: Configure the starwars dm object with primary and foreign keys and colors.

See Also

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

Examples

Run this code
# NOT RUN {
# 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)
}

# }

Run the code above in your browser using DataLab