devkit is a professional, zero-dependency R development toolkit designed to streamline package management, environment setup, session auditing, and batch processing. It provides a suite of utilities to help developers maintain CRAN compliance and optimize their development workflow.
๐ Installation
Install the released version of devkit from CRAN with:
install.packages("devkit")Or install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("zankrut20/devkit")๐ ๏ธ Usage
Once installed, simply load the library to access all utilities:
library(devkit)
# Example: Audit your package dependencies
audit_dependencies()
# Example: Clean up memory hogs
hunt_zombies()๐ฆ Toolkit Overview
๐ฆ Package Management
-
audit_dependencies(): Verifies DESCRIPTION file vs actual code usage. -
remove_package(): Smart package removal with orphan dependency checking. -
remove_user_installed_packages(): Cleans all user-installed packages while preserving base/recommended ones. -
scan_dependencies(): Identifies unused packages in your session.
๐งน Memory Management
-
sweep_memory(): Removes large objects and triggers garbage collection. -
hunt_zombies(): Cleans hidden temp files and orphaned graphics devices. -
sweep_temp_cache(): Flushes R session caches across the system.
๐ง Development Environment
-
bootstrap_dev_env(): Installs and attaches core dev tools. -
manage_deprecation(): Scaffolds deprecation wrappers and refactors calls. -
setup_preflight(): Configures Git pre-commit hooks for safety. -
setup_sentinel(): Enables dual-logging for session reproducibility.
๐ Session Management
-
audit_script(): Snapshots session state before and after script execution. -
detect_masking(): Resolves namespace conflicts and function masking. -
export_snapshot(): Exports attached packages to an installation script.
โ๏ธ Batch Processing
-
dispatch_checkpoints(): Crash-resilient batch processing with recovery. -
loop_guardian(): Memory-safe iteration with RAM monitoring. -
network_diplomat(): Rate-limited network requests with exponential backoff.
๐๏ธ Code Generation
-
architect_release(): Automates version bumping and release notes. -
architect_vignette(): Scaffolds CRAN-compliant vignettes. -
scaffold_parallel(): Generates parallel processing boilerplate. -
scaffold_tests(): Generates testthat boilerplate. -
simulate_clean_room(): Verifies script reproducibility in a vanilla session.
๐ Privacy
-
mask_identity(): Interactively anonymizes PII in datasets.
๐ ๏ธ Utilities
-
benchmark_branches(): Compares performance across Git branches. -
dictate_dictionary(): Generates roxygen2 documentation for data frames.
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
