Install
$ agentstack add skill-leolin990405-r-analytics-skill-data-table ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
data.table
High-performance data manipulation.
Basics
library(data.table)
# Create
dt 3]
dt[x > 3 & y == "a"]
dt[x %in% c(1, 2, 3)]
dt[x %between% c(2, 4)]
dt[y %like% "^a"]
# Order
dt[order(x)]
dt[order(-x)]
dt[order(x, -y)]
# First/last rows
dt[1:5]
dt[.N] # Last row
dt[(.N-4):.N] # Last 5 rows
Column Operations (j)
# Select columns
dt[, .(x, y)]
dt[, x] # Returns vector
dt[, .(x)] # Returns data.table
dt[, c("x", "y"), with = FALSE]
# Compute
dt[, .(mean_x = mean(x), sum_y = sum(y))]
dt[, .(total = x + y)]
# Modify in place (:=)
dt[, z := x * 2]
dt[, c("a", "b") := .(x + 1, y)]
dt[, `:=`(a = x + 1, b = y)]
# Remove columns
dt[, z := NULL]
dt[, c("a", "b") := NULL]
# Special symbols
dt[, .N] # Number of rows
dt[, .I] # Row indices
dt[, .SD] # Subset of data
dt[, .SDcols] # Columns in .SD
Grouping (by)
# Group by
dt[, .(mean = mean(x)), by = category]
dt[, .(mean = mean(x)), by = .(cat1, cat2)]
# keyby (sorted)
dt[, .(mean = mean(x)), keyby = category]
# .SD operations
dt[, lapply(.SD, mean), by = category]
dt[, lapply(.SD, mean), by = category, .SDcols = c("x", "y")]
dt[, lapply(.SD, mean), by = category, .SDcols = is.numeric]
# .N by group
dt[, .N, by = category]
Keys and Joins
# Set key
setkey(dt, id)
setkeyv(dt, c("id1", "id2"))
# Join
dt1[dt2, on = "id"] # Right join
dt2[dt1, on = "id"] # Left join
dt1[dt2, on = "id", nomatch = 0] # Inner join
# Multiple keys
dt1[dt2, on = .(a, b)]
dt1[dt2, on = .(a = x, b = y)]
# Non-equi joins
dt1[dt2, on = .(x >= a, x 0][order(-y)][, .(mean = mean(x)), by = cat]
# Or with line breaks
dt[x > 0
][order(-y)
][, .(mean = mean(x)), by = cat]
Performance
# Set index (secondary key)
setindex(dt, col)
# fread/fwrite (fast I/O)
dt <- fread("file.csv")
fwrite(dt, "output.csv")
# Modify by reference
set(dt, i = 1L, j = "x", value = 100)
setnames(dt, "old", "new")
setcolorder(dt, c("b", "a", "c"))
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: LeoLin990405
- Source: LeoLin990405/r-analytics-skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.