box is an R package providing a modular system / module loader for organizing reusable R code outside of full packages. It allows users to treat R scripts (files/folders) as modules — possibly nested — with explicit exports, imports, and scoping. The idea is to let users structure code in a more modular, composable way, without needing every reusable component to be a full CRAN-style package. It also provides a cleaner syntax for importing functions or modules (via box::use) that allows scoping control and avoids global pollution. Such modules can be stored in a central module search path (configured via options('box.path')) analogous to the R package library, or locally in individual projects. Let’s assume the module we just defined is stored in a file hello_world.r inside a directory mod, which is inside the module search path.

Features

  • Modules are regular R files/folders (not full packages) that can export selected functions via #' @export or implicitly export everything
  • box::use() syntax supports explicit import of specific names, aliasing, and limiting attached names to local scope rather than global environment pollution
  • Nested modules / hierarchical module path support (modules inside directories, relative paths, fully qualified names)
  • Support for unloading / reloading modules, module caching etc., useful during development or interactive use
  • Provides help/documentation via box::help(), supports roxygen2 style documentation in modules etc.
  • Works with compiled code, supports dependencies, suggestions of using modules instead of packages for smaller reusable pieces

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow box

box Web Site

Other Useful Business Software
Failed Payment Recovery for Subscription Businesses Icon
Failed Payment Recovery for Subscription Businesses

For subscription companies searching for a failed payment recovery solution to grow revenue, and retain customers.

FlexPay’s innovative platform uses multiple technologies to achieve the highest number of retained customers, resulting in reduced involuntary churn, longer life span after recovery, and higher revenue. Leading brands like LegalZoom, Hooked on Phonics, and ClinicSense trust FlexPay to recover failed payments, reduce churn, and increase customer lifetime value.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of box!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

R

Related Categories

R Dependency Managers

Registered

2025-09-12