Skip to content

Instantly share code, notes, and snippets.

View jeremy-allen's full-sized avatar

Jeremy Allen jeremy-allen

View GitHub Profile
@sj-io
sj-io / CLAUDE.md
Created August 21, 2025 09:25
Claude R Tidyverse Expert

Modern R Development Guide

This document captures current best practices for R development, emphasizing modern tidyverse patterns, performance, and style. Last updated: August 2025

Core Principles

  1. Use modern tidyverse patterns - Prioritize dplyr 1.1+ features, native pipe, and current APIs
  2. Profile before optimizing - Use profvis and bench to identify real bottlenecks
  3. Write readable code first - Optimize only when necessary and after profiling
  4. Follow tidyverse style guide - Consistent naming, spacing, and structure

LLM for code generation

Currently three main styles:

  1. Autocomplete
    • e.g. github copilot, windsurf
    • Inline "ghost text" as you type
    • Sometimes amazingly good; often pretty useless
    • Need to train yourself to ignore spurious suggestions
matches:
# Markdown / HTML things
- trigger: ";mdl"
replace: "[$|$]({{clipb}})"
vars:
- name: "clipb"
type: "clipboard"
- trigger: ";br"
replace: "<br>"

App Install Plan

Critical