Coder Social home page Coder Social logo

Comments (3)

jeromerobles avatar jeromerobles commented on August 15, 2024 1

New version (envair 0.1.0.0), now removes the loading of libraries

from envair.

ateucher avatar ateucher commented on August 15, 2024

Hope you don't mind me chiming in here! It's not considered good practice to load libraries in a package (in fact if you tried to upload to CRAN they won't allow it). The reason is that it is altering the user's environment in ways that they have not asked for, and is considered "user-hostile" (perhaps a bit harsh, but @GailR's experience proves the point).

Instead you should list all of the packages that envair uses in the Imports: field in the DESCRIPTION file. That ensures that all of the packages will be installed and available for your package to use. It looks like you normally specify the functions using the package::function() syntax, which is great - that is how you call a function without loading the package using library() or require(). So by listing the dependencies in the DESCRIPTION you will ensure the required packages are installed, and then using the package::function() you can call all the functions you need without loading the libraries.

Some useful links:
https://r-pkgs.org/description.html#dependencies
https://r-pkgs.org/namespace.html

Hope this is helpful!

from envair.

aseagram avatar aseagram commented on August 15, 2024

+1 upvote to have this issue fixed ASAP, as described above. @jeromerobles

from envair.

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.