Write reusable, composable and modular R code (by klmr)

Box Alternatives

Similar projects and alternatives to box

  • GitHub repo ggplot2

    box VS ggplot2

    An implementation of the Grammar of Graphics in R

  • GitHub repo sys

    box VS sys

    Easily create reusable command line scripts with R

  • Nanos

    Run Linux Software Faster and Safer than Linux with Unikernels.

  • GitHub repo lintr

    box VS lintr

    Static Code Analysis for R

  • GitHub repo renv

    box VS renv

    renv: Project environments for R.

  • GitHub repo tidytable

    box VS tidytable

    Tidy interface to 'data.table'

  • GitHub repo fun

    box VS fun

    Module for functional programming in R

  • GitHub repo rnim

    box VS rnim

    A bridge between R and Nim

  • Scout APM

    Scout APM: A developer's best friend. Try free for 14-days. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.

  • GitHub repo uktrade

    This R package is a wrapper for HMRC's newly released API. It provides convenient functions to load Overseas Trade Statistics, Regional Trade Statistics, and trader data. It also provides a function for loading custom URLs.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better box alternative or higher similarity.

Suggest an alternative to box

Reviews and mentions

Posts with mentions or reviews of box. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-06.
  • How do you organize your code snippets/notes? | 2021-10-06
    Check out ‘box’, it’s designed precisely to solve (most of) your issues. Namely, it allows you to organise your R code files into (nested) modules, which can either be part of one project, or they can be stored centrally, and reused seamlessly across projects. It also allows you to document your code and makes this documentation available just like package documentation.
  • [Q] Is there any downside to always writing in R Markdown? | 2021-10-05
    I generally recommend writing all code with reuse in mind. If nothing else it tends to make code more readable. But, more generally, non-RMarkdown scripts are reusable elsewhere (either by converting them into a package or, simpler, by using them as ‘box’ modules).
  • How to convert a for loop statement into a function? | 2021-09-30
    use the box package to create a box module and then include a box::use(myfun) instead of source
  • Learning how to structure code in R... | 2021-08-31
    As for project organisation, there are a few conventions but unfortunately R doesn’t really have a good, scalable, built-in way of structuring larger projects. Reusable code is conventionally structured as packages but these can’t be nested hierarchically. An alternative, modular approach is enabled by my package ‘box’. The Get Started guide explains how to structure R code in reusable modules.
  • best way to set current directory to working directory | 2021-06-24
    Yes: don’t use setwd and either use the project-based workflow already discussed in other answers, or use ‘box’, and then use box::file to find files stored relative to the current module. This works even more reliably than ‘here’, in fact, since it makes fewer assumptions about the project structure.
  • Creating your own R package | 2021-05-30
    I'll also name drop the Box package, which serves like a middle of the road option between creating packages and sourcing scripts. It allows you to treat scripts (and the functions inside them) like packages without having to go through all the extra steps to build packages. In that way, it's more similar to creating and importing python modules.
  • R versus other programming languages | 2021-05-19
    Shameless plug: Using ‘box’ to write modular, reusable code. Writing R packages requires comparatively large effort, and simple R scripts have various deficiencies.
  • import a function from a package | 2021-05-17
    Incidentally, if you often write code like this (= import individual functions from packages rather than attaching the whole package), check out the ‘box’ package, it provides a systematic solution for this.
  • import functions from a package without loading the package | 2021-04-10
    I don't fully understand what happens when you attach a package, so I can't speak to your question about side-effects. However, if you're looking for an alternative, possibly safer, strategy, you might try the package box. | 2021-04-10
    There is: use the ‘box’ package. It allows this and more. In your specific case, you’d write
  • Reference project for an R 2+2=4 style application coverage, testthat and a build file | 2021-03-31
    That said, I’ve been playing with a framework for command line applications in R (as a ‘box’ module), and I guess you could call the example application “2+2=4” style (it’s a command line calculator, complete with automatically generated option parser etc.).
  • Rcpp compilation time | 2021-03-30
    You shouldn’t be running cpp_source more than once on the same file. If you want to use C++ code in reusable code, put it into a package (or a module).
  • What would you like to see from an R2 / R++ / R# | 2021-03-27
    You can do that with ‘box’, check it out!
  • Relative path problem | 2021-03-19
    For regular code, there are several workarounds. But IMHO the simplest is to use the package ‘box’ (disclaimer: I’m the author) to organise your code. This will allow you to use box::file() in pretty much the same way as you can use system.file() inside packages, except it works everywhere, and it also works with nonexistent (or not-yet-existent) files (system.file only works for files that already exist).
  • Need help in function writing | 2021-02-24
    Rather, don’t use *either*** inside a functions, since using them has a global side-effect. Either load all required packages outside the function, or (ideally) write the function in such a way that it doesn’t depend on the global package search path. Either by qualifying all package access explicitly (via e.g. dplyr::…) or by using the ‘box’ package to load packages locally.


Basic box repo stats
5 days ago

klmr/box is an open source project licensed under MIT License which is an OSI approved license.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Find remote jobs at our new job board There are 37 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.