Skip to main content
100%

How to use R like Python

✓ Published0🌍 Public
Aandyreagan
Last edited Mar 9, 2021
Created on Mar 9, 2021

This example demonstrates how to write modular, maintainable R scripts using the `box` package instead of `source()` or `library()`. It shows a main script with pure functions and a CLI entry point, loaded alongside a utility file and an unconventionally named module. The code uses `box::use` for dependency management, `argparse` for command-line parsing, `arrow` for Parquet I/O, and `testthat` for inline validation. The workflow emphasizes avoiding `setwd()` and keeping scripts testable and reusable across projects.

AI-generated description

Similar vizzes