explaingit

hadley/dm

Analysis updated 2026-08-16 · repo last pushed 2026-05-16

Audience · dataComplexity · 2/5MaintainedLicenseSetup · easy

TLDR

An R package that bundles related data frames into a single object, lets you define how they link together, and then automates joins, visualizes relationships, and checks data integrity across all tables.

Mindmap

mindmap
  root((repo))
    What it does
      Bundles related tables
      Defines keys and links
      Automates joins
      Checks data integrity
    Tech stack
      R
      dplyr grammar
      CRAN package
    Use cases
      Organize messy CSV files
      Prototype data models
      Deploy to databases
    Audience
      Researchers
      Data analysts
      Data teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Organize and check a messy set of CSV files for integrity before publishing results.

USE CASE 2

Prototype a data model locally in memory and then deploy it to a production database.

USE CASE 3

Visualize and validate relationships across multiple related tables before analysis.

USE CASE 4

Flatten related tables into a single wide table for analysis without manual join setup.

What is it built with?

RdplyrCRAN

How does it compare?

hadley/dm000madz000/rfid-attendance00kaku/gallery-slider-block
LanguageTypeScriptJavaScript
Last pushed2026-05-162024-07-222021-05-19
MaintenanceMaintainedDormantDormant
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedatadevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install directly from CRAN with install.packages('dm'), no external infrastructure or API keys needed.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

If you work with data in R, you often deal with multiple tables that relate to each other, say, a flights table, an airports table, and an airlines table. The dm package helps you organize, connect, and work with those tables as a single unit rather than juggling them individually. At its core, dm lets you bundle related data frames together into one object and define how they link up, which columns are primary keys, which are foreign keys, and so on. Once your tables are connected, you get a few useful capabilities: you can visualize the relationships between tables, perform joins that automatically "know" how tables relate to each other (so you don't have to manually specify join columns every time), and run consistency checks that flag data problems like orphaned records or missing references. You can also flatten related tables into a single wide table when you need everything in one place for analysis. This is built for R users who work with relational data, researchers, analysts, and data teams. A solo analyst might use it to keep a messy set of CSV files organized and check them for integrity before publishing results. A team might use it to prototype a data model locally and then deploy that same structure to a production database, scaling from in-memory data frames to a system holding billions of rows. The design philosophy borrows heavily from dplyr, R's most popular data manipulation toolkit. If you already know dplyr verbs like filter, mutate, and select, dm extends that same familiar grammar to multi-table workflows. That means there's very little new syntax to learn, you're largely applying tools you already know to a broader context. The project is stable, MIT-licensed, and available on CRAN, which is the standard distribution channel for R packages.

Copy-paste prompts

Prompt 1
I have R data frames called flights, airports, and airlines that are related. Show me how to use the dm package to bundle them into one dm object and visualize their relationships.
Prompt 2
Using dm in R, how do I define primary keys and foreign keys for my tables so that joins happen automatically without specifying join columns each time?
Prompt 3
How do I use the dm package to check my relational data for orphaned records and missing references before I publish my analysis?
Prompt 4
Show me how to start with a dm object of in-memory R data frames and deploy that same table structure to a production database.

Frequently asked questions

What is dm?

An R package that bundles related data frames into a single object, lets you define how they link together, and then automates joins, visualizes relationships, and checks data integrity across all tables.

Is dm actively maintained?

Maintained — commit in last 6 months (last push 2026-05-16).

What license does dm use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is dm to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is dm for?

Mainly data.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.