-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpull_tbl.Rd
More file actions
50 lines (46 loc) · 1.83 KB
/
Copy pathpull_tbl.Rd
File metadata and controls
50 lines (46 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dm.R
\name{pull_tbl}
\alias{pull_tbl}
\title{Retrieve a table}
\usage{
pull_tbl(dm, table, ..., keyed = FALSE)
}
\arguments{
\item{dm}{A \code{dm} object.}
\item{table}{One unquoted table name for \code{pull_tbl.dm()}, ignored for \code{pull_tbl.dm_zoomed()}.}
\item{...}{These dots are for future extensions and must be empty.}
\item{keyed}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
Set to \code{TRUE} to return objects of the internal class \code{"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 \code{dm} object.
See \code{\link[=dm_deconstruct]{dm_deconstruct()}} for a function that generates corresponding code
for an existing dm object, and \code{vignette("tech-dm-keyed")} for details.}
}
\value{
The requested table.
}
\description{
This generic has methods for both \code{dm} classes:
\enumerate{
\item With \code{pull_tbl.dm()} you can chose which table of the \code{dm} you want to retrieve.
\item With \code{pull_tbl.dm_zoomed()} you will retrieve the zoomed table in the current state.
}
}
\examples{
\dontshow{if (rlang::is_installed("nycflights13")) withAutoprint(\{ # examplesIf}
# 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()
\dontshow{\}) # examplesIf}
}
\seealso{
\code{\link[=dm_deconstruct]{dm_deconstruct()}} to generate code of the form
\code{pull_tbl(..., keyed = TRUE)} from an existing \code{dm} object.
}