Giter VIP home page Giter VIP logo

Comments (7)

pgensler avatar pgensler commented on June 3, 2024 1

@eddelbuettel I think the core issue here is that if this is truly meant to be a wrapper around install.packages, then at the very least provide a startup message to state "Starting install for package {x}" , and once the install has completed, output a message with "Package Install complete for package {x}".

from littler.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

I appreciated your energy level, but I'm sorry that I may not have time for essays this length, and I also never said anywhere I would do generic R counseling here -- try the r-help list or StackOverflow.

As for your question, did you read the documentation for the one pertinent function here: install.packages() ? You can dial installation of suggests up or down.

from littler.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

Also, I presume you understand that dependencies are in fact a graph, correct? Ie the (in)famous ten or so tidyverse packages (that are directly listed) expand to a total of around 49 (when I once counted) packages in total. I would surmise that you have the same here.

Edit: Per the logic below, sixtythree:

R> tidies <- package_dependencies("tidyverse", recursive=TRUE)
R> tidies
$tidyverse
 [1] "broom"        "dplyr"        "forcats"      "ggplot2"      "haven"        "httr"        
 [7] "hms"          "jsonlite"     "lubridate"    "magrittr"     "modelr"       "purrr"       
[13] "readr"        "readxl"       "stringr"      "tibble"       "rvest"        "tidyr"       
[19] "xml2"         "plyr"         "psych"        "reshape2"     "nlme"         "methods"     
[25] "assertthat"   "bindrcpp"     "glue"         "pkgconfig"    "rlang"        "R6"          
[31] "Rcpp"         "utils"        "BH"           "plogr"        "digest"       "grid"        
[37] "gtable"       "MASS"         "scales"       "stats"        "lazyeval"     "mime"        
[43] "curl"         "openssl"      "cellranger"   "selectr"      "stringi"      "tidyselect"  
[49] "tools"        "bindr"        "rematch"      "grDevices"    "graphics"     "lattice"     
[55] "mnormt"       "parallel"     "foreign"      "RColorBrewer" "dichromat"    "munsell"     
[61] "labeling"     "viridisLite"  "colorspace"  

R> 

from littler.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

Simplest (?) possible answer:

R> library(tools)
R> deps <- package_dependencies("rstan", recursive=TRUE)
R> deps
$rstan
 [1] "ggplot2"      "StanHeaders"  "methods"      "stats4"       "inline"       "gridExtra"
 [7] "Rcpp"         "RcppEigen"    "BH"           "digest"       "grid"         "gtable"
[13] "MASS"         "plyr"         "reshape2"     "scales"       "stats"        "tibble"
[19] "lazyeval"     "grDevices"    "graphics"     "utils"        "Matrix"       "lattice"
[25] "stringr"      "RColorBrewer" "dichromat"    "munsell"      "labeling"     "R6"
[31] "viridisLite"  "rlang"        "colorspace"   "stringi"      "magrittr"     "tools"

R> 

from littler.

pgensler avatar pgensler commented on June 3, 2024

The reason I did not post this on SO is because I am asking about the definition of terms about your function, and how dependencies works with regards to install2.r, as when I have tried installing a package from source on my local machine, it does not install all these crazy other pkgs, such as miniUI and RCurl, so I would think that it has something to do with install2.r, as it states:

"-d --deps DEPS install suggested dependencies as well [default: NA]"

so one would think that that behavior should override what is happening in install.packages, correct? Does NA mean that this does not install Suggests?
For starters, why is this installing miniUI, RCurl, and packrat with stan, both are not on that list you supplied? I can understand later on in my script, but it just seems it does it at-will.

My main issue that that I can't truly understand the output of building my container, and as I'm going through the build file, nothing seems to line up, which is extremely frustrating.

from littler.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

Again, install2.r and particularly install.r which I essentially use daily are trivial and minimal wrappers around base R functions. You seem to suspect that we are doing some magic: it is the opposite.

It really just calls base R, so if you are confused about its functioning there are better places that this issue ticketing system provided to improve the littler package.

As for your quoted line: see help(install.packages) as per my last message(s). It reads:

dependencies: logical indicating whether to also install uninstalled
          packages which these packages depend on/link
          to/import/suggest (and so on recursively).  Not used if
          ‘repos = NULL’.  Can also be a character vector, a subset of
          ‘c("Depends", "Imports", "LinkingTo", "Suggests",
          "Enhances")’.

          Only supported if ‘lib’ is of length one (or missing), so it
          is unambiguous where to install the dependent packages.  If
          this is not the case it is ignored, with a warning.

          The default, ‘NA’, means ‘c("Depends", "Imports",
          "LinkingTo")’.

          ‘TRUE’ means to use ‘c("Depends", "Imports", "LinkingTo",
          "Suggests")’ for ‘pkgs’ and ‘c("Depends", "Imports",
          "LinkingTo")’ for added dependencies: this installs all the
          packages needed to run ‘pkgs’, their examples, tests and
          vignettes (if the package author specified them correctly).

          In all of these, ‘"LinkingTo"’ is omitted for binary
          packages.

and you want the paragraph in the middle. Ok?

I am truly sorry that I can't help you with your container. I am currently tied up with infrastructure issues at my end. As for your issues, I find that if I simplify, simplify, simplify and simplify some here I eventually get to the issue.

from littler.

eddelbuettel avatar eddelbuettel commented on June 3, 2024

It is open source software. Exercise your money back guarantee, and as you don't like it just don't use it.

I wrote this function for myself and use it. And so do other people, including our use in Rocker or whereever you found it. If you desire different functionality, write your own, or write a wrapper. I have nothing more to say here and will lock this now. Thanks for the feedback, we clearly don't all have to be on the same page -- but you are literally the first guy to find a problem here where loads of folks have just used it merrily. But whatever floats your boat...

from littler.

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.