
dm_draw()
uses DiagrammeR to draw diagrams.
Use DiagrammeRsvg::export_svg()
to convert the diagram to an SVG file.
dm_draw(
dm,
rankdir = "LR",
col_attr = NULL,
view_type = c("keys_only", "all", "title_only"),
columnArrows = TRUE,
graph_attrs = "",
node_attrs = "",
edge_attrs = "",
focus = NULL,
graph_name = "Data Model",
...,
column_types = NULL
)
A dm
object.
Graph attribute for direction (e.g., 'BT' = bottom --> top).
Deprecated, use colummn_types
instead.
Can be "keys_only" (default), "all" or "title_only". It defines the level of details for rendering tables (only primary and foreign keys, all columns, or no columns).
Edges from columns to columns (default: TRUE
).
Additional graph attributes.
Additional node attributes.
Additional edge attributes.
A list of parameters for rendering (table filter).
The name of the graph.
These dots are for future extensions and must be empty.
Set to TRUE
to show column types.
An object of class grViz
(see also DiagrammeR::grViz()
), which,
when printed, produces the output seen in the viewer as a side effect.
dm_set_colors()
for defining the table colors.
# NOT RUN {
dm_nycflights13() %>%
dm_draw()
dm_nycflights13(cycle = TRUE) %>%
dm_draw(view_type = "title_only")
head(dm_get_available_colors())
length(dm_get_available_colors())
dm_nycflights13() %>%
dm_get_colors()
# }
Run the code above in your browser using DataLab