- Use tidyverse style: snake_case for objects and functions
- Limit lines to 100 characters
- Use
<-for assignment, not= - Use the package
conflictedto resolve package conflicts - Use
# ----as section delimiters - Always use ggpubr::theme_pubr() for plot themes
Example:
# Data processing ----
processed_data <- raw_data %>%
dplyr::filter(quality > threshold) %>%
dplyr::mutate(log_value = log10(value + 1))- Follow PEP 8 with 100-character line limit
- Use
snake_casefor functions and variables,PascalCasefor classes - Use type hints where reasonable
- Format with Black or equivalent
Example:
def calculate_statistics(data: pd.DataFrame) -> dict:
"""Calculate summary statistics."""
return {
"mean": data.mean(),
"std": data.std(),
}- Use
#!/bin/bashheader - Comment non-obvious sections
- Use meaningful variable names in UPPER_CASE
- Check for errors:
set -eat top of script
Example:
#!/bin/bash
set -e
INPUT_FILE="$1"
OUTPUT_DIR="./processed"