Coder Social home page Coder Social logo

Comments (6)

krzjoa avatar krzjoa commented on September 26, 2024 1

From my perspective, as the multiple files are better than one big file, so are multiple subdirectories better than one big directory. It would really make difference.

Sub-namespaces is another interesting topic. I didn't write about it because for now I have no idea, how should it be implemented.

from wishlist-for-r.

mlell avatar mlell commented on September 26, 2024 1

@krzjoa the package box provides modules and sub-modules. The barrier to start a module is much lower than to start a package, but it lacks the versioning and distribution mechanisms of R packages

from wishlist-for-r.

karoliskoncevicius avatar karoliskoncevicius commented on September 26, 2024

There is a some reason subdirectories are not allowed. The manual states that only special-purpose "unix/" and "windows/" subdirectories are allowed under R/ , presumedly for files that are specific to windows or unix systems.

Also, when discussing this matter, a well known R developer Hadley states here that he has no trouble managing big numbers of files in his packages.

A personal solution might be using directories while developing and then flattening them when building a package. This is also offered as a solution in the r-devel thread on the same topic.

from wishlist-for-r.

krzjoa avatar krzjoa commented on September 26, 2024

Yes, I forgot to mention about the possible OS-related subdirectories. But still, it'd be not so hard to keep unix/ and windows/ subdirs reserved for the special purposes.

I know that there is no absolute measure to state that "there is to many/not so many files in this directory"
and I stand by my opinion.

from wishlist-for-r.

nfultz avatar nfultz commented on September 26, 2024

For me, there's little benefit (but also little harm) to allowing subdirectories if, at the end of the day, all the files are simply concatenated together - eg https://github.com/wch/r-source/blob/780021752eb83a71e2198019acf069ba8741103b/src/library/tools/R/admin.R#L299-L314

If, somehow, subdirectories could automatically be separately namespaced, the tools package itself would be a good candidate for refactoring - it currently uses a few nested, thousand-line closures to achieve some isolation, but that can make it hard to debug or figure out what it's actually doing.

from wishlist-for-r.

krzjoa avatar krzjoa commented on September 26, 2024

I know the box package, but the goal of this proposal is to organize scripts in packages rather than create submodules.

from wishlist-for-r.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.