بنقرة واحدة
lobstr
R lobstr package for memory inspection. Use for understanding R object memory usage and structure.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
R lobstr package for memory inspection. Use for understanding R object memory usage and structure.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
R language data analysis and visualization skill. Use when user asks to (1) run R scripts or code, (2) install/update R packages, (3) perform data analysis with R, (4) create visualizations with ggplot2/plotly, (5) statistical analysis, (6) data manipulation with tidyverse/dplyr/data.table. Triggers on keywords like "R语言", "R脚本", "ggplot", "tidyverse", "数据分析", "可视化".
R DALEX package for model explanations. Use for explaining complex machine learning models.
R iml package for interpretable ML. Use for model-agnostic interpretability methods.
R lime package for local explanations. Use for explaining individual predictions with local interpretable models.
R packages for ML interpretability. Use for explaining and interpreting machine learning models.
R vip package for variable importance. Use for computing and visualizing variable importance scores.
| name | lobstr |
| description | R lobstr package for memory inspection. Use for understanding R object memory usage and structure. |
Visualize R data structures.
library(lobstr)
# Object size
obj_size(x)
# Multiple objects
obj_size(x, y)
# Shared memory
obj_size(x, y) # May be less than obj_size(x) + obj_size(y)
# Memory address
obj_addr(x)
# Check if same object
obj_addr(x) == obj_addr(y)
# Reference count
ref(x)
# Track references
x <- 1:10
y <- x
ref(x) # Shows 2 references
# View expression tree
ast(f(x, y))
# Complex expression
ast(
if (x > 0) {
sqrt(x)
} else {
-sqrt(-x)
}
)
# View object structure
sxp(x)
# List structure
sxp(list(a = 1, b = 2))
# Track memory changes
x <- 1:1e6
obj_size(x)
y <- x
obj_size(x, y) # Same memory (copy-on-modify)
y[1] <- 0L
obj_size(x, y) # Now separate
# Compare object sizes
sizes <- c(
"vector" = obj_size(1:1000),
"list" = obj_size(as.list(1:1000)),
"df" = obj_size(data.frame(x = 1:1000))
)
sizes
# Integer vs double
obj_size(1:1000) # Integer
obj_size(as.double(1:1000)) # Double (2x size)
# Character interning
x <- rep("hello", 1000)
obj_size(x) # Efficient due to interning
# View call tree
tree(quote(f(g(x), h(y, z))))