rAvoid common R mistakes β vectorization traps, NA propagation, factor surprises, and indexing gotchas.
Install via ClawdBot CLI:
clawdbot install ivangdavila/rRequires:
apply(), lapply(), sapply(), or purrr::map()sum(x) not for (i in x) total <- total + iifelse() is vectorized β if is not, use ifelse() for vector conditionsx[1], not x[0]x[0] returns empty vector β not error, silent bugx[-1] removes first element[[ extracts single element β [ returns subset (list stays list)df[, 1] drops to vector β use df[, 1, drop = FALSE] to keep data frame1 + NA is NA, NA == NA is NAis.na() to check β not x == NAna.rm = TRUE β mean(x) returns NA if any NA presentna.omit() removes rows with any NA β may lose data unexpectedlycomplete.cases() returns logical vector β rows without NAstringsAsFactors = FALSE or modern Rlevels() shows categories β but factor values are integers internallyfactor(x, levels = c(old, new))as.numeric(factor) gives level indices β use as.numeric(as.character(factor)) for valuesdroplevels() β or factor() againc(1,2,3) + c(10,20) gives 11, 22, 13x + 1 adds 1 to all elementsdf[, 1] stays tibbleas_tibble() to convert β from tibble or dplyr package<- is idiomatic R β = works but avoided in style guides<<- assigns to parent environment β global assignment, usually a mistake-> right assignment exists β rarely used, confusinglocal() creates isolated scope β variables don't leak outT and F can be overwritten β use TRUE and FALSE always1:length(x) fails on empty x β gives c(1, 0), use seq_along(x)sample(5) vs sample(c(5)) β different! first gives 1:5 permutationstrsplit() returns list β even for single stringAI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.