Skip to content

Instantly share code, notes, and snippets.

View leoniedu's full-sized avatar

Eduardo Leoni leoniedu

  • IBGE
  • Salvador, Brazil
View GitHub Profile
@leoniedu
leoniedu / CLAUDE.md
Created October 7, 2025 22:20 — forked from sj-io/CLAUDE.md
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
@leoniedu
leoniedu / toTitleCasePT.R
Last active September 12, 2024 15:22 — forked from jjesusfilho/toTitleCasePT.R
Converts Portuguese strings to Title Case
#' Convertion to title case with lower case for some classes of words.
#'
#' In written Portuguese, when converting to title case, it is not usual
#' to keep in title case some words, like prepositions, conjunctions,
#' articles and some kinds of pronouns. This functions locates those
#' cases and converts them to lower case. Based on gist ToTitleCasePT https://gist.github.com/jjesusfilho/454192db8356eb9c486a02698338221a by https://github.com/jjesusfilho
#'
#' @param string vector of characters to be converted to title case
#' but with connector words (one-word prepositions and conjunctions)
#' and articles (both definite and indefinite) and some pronouns