pull_tbl {dm}R Documentation

Retrieve a table

Description

This generic has methods for both dm classes:

  1. With pull_tbl.dm() you can chose which table of the dm you want to retrieve.

  2. With pull_tbl.dm_zoomed() you will retrieve the zoomed table in the current state.

Usage

pull_tbl(dm, table, ..., keyed = FALSE)

Arguments

dm

A dm object.

table

One unquoted table name for pull_tbl.dm(), ignored for pull_tbl.dm_zoomed().

...

These dots are for future extensions and must be empty.

keyed

[Experimental] Set to TRUE to return objects of the internal class "dm_keyed_tbl" that will contain information on primary and foreign keys in the individual table objects. This allows using dplyr workflows on those tables and later reconstruct them into a dm object. See dm_deconstruct() for a function that generates corresponding code for an existing dm object, and vignette("tech-dm-keyed") for details.

Value

The requested table.

See Also

dm_deconstruct() to generate code of the form pull_tbl(..., keyed = TRUE) from an existing dm object.

Examples


# For an unzoomed dm you need to specify the table to pull:
dm_nycflights13() %>%
  pull_tbl(airports)

# If zoomed, pulling detaches the zoomed table from the dm:
dm_nycflights13() %>%
  dm_zoom_to(airports) %>%
  pull_tbl()


[Package dm version 1.0.10 Index]