Skip to content
Back to skills

Dbplyr

ASecurity

R dbplyr package for database backends. Use for dplyr verbs on database tables with lazy evaluation.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 4, 2026
datasqldatabasebackend

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill dbplyr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dbplyr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dbplyr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-dbplyr/badge)](https://www.skillsdirectory.com/skills/leolin990405-dbplyr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dbplyr
description: R dbplyr package for database backends. Use for dplyr verbs on database tables with lazy evaluation.
---

# dbplyr Package

dplyr backend for databases with lazy evaluation.

## Connect and Use

```r
library(dplyr)
library(dbplyr)
library(DBI)

con <- dbConnect(RSQLite::SQLite(), "database.db")

# Reference table (lazy)
tbl_flights <- tbl(con, "flights")

# dplyr verbs (translated to SQL)
result <- tbl_flights %>%
  filter(year == 2023) %>%
  group_by(carrier) %>%
  summarise(
    n = n(),
    avg_delay = mean(arr_delay, na.rm = TRUE)
  ) %>%
  arrange(desc(n))

# View SQL
show_query(result)

# Execute and collect
df <- collect(result)
```

## SQL Translation

```r
# See generated SQL
tbl_flights %>%
  filter(distance > 1000) %>%
  select(carrier, flight, distance) %>%
  show_query()

# Custom SQL
tbl(con, sql("SELECT * FROM flights WHERE year = 2023"))
```

## Window Functions

```r
tbl_flights %>%
  group_by(carrier) %>%
  mutate(
    rank = row_number(),
    pct = percent_rank()
  ) %>%
  show_query()
```

## Compute/Copy

```r
# Create temp table from query
tbl_flights %>%
  filter(month == 1) %>%
  compute("jan_flights")

# Copy local df to database
copy_to(con, local_df, "new_table")
```

## Disconnect

```r
dbDisconnect(con)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.