Skip to content

Instantly share code, notes, and snippets.

@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
@josef-pkt
josef-pkt / nonparametric_cuzicktrend.py
Last active January 1, 2023 15:29
Cuzick's non-parametric test of trend
'''Cuzick's non-parametric test of trend
Author : Josef Perktold
'''
import numpy as np
from scipy import stats
from scipy.stats.stats import rankdata, tiecorrect, square_of_sums