Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe support LinkingTo as well? #1

Closed
eddelbuettel opened this issue Mar 28, 2018 · 6 comments
Closed

Maybe support LinkingTo as well? #1

eddelbuettel opened this issue Mar 28, 2018 · 6 comments

Comments

@eddelbuettel
Copy link

@eddelbuettel eddelbuettel commented Mar 28, 2018

When I build (much simpler) dependencies via the tools package, I follow their usual pattern of (and here I quote from the help for tools::package_dependencies)

   which: a character vector listing the types of dependencies, a
          subset of ‘c("Depends", "Imports", "LinkingTo", "Suggests",
          "Enhances")’.  Character string ‘"all"’ is shorthand for that
          vector, character string ‘"most"’ for the same vector without
          ‘"Enhances"’.

and tend to pick either 'all' or 'most' -- or just stick with the default value of the more explicit narrower set of c("Depends", "Imports", "LinkingTo").

For packages like Rcpp and BH that matters a lot as most of the 'edges' in the graph are compile-time via LinkingTo, rather than via depended-upon or imported R code.

That said, awesome looking package :) This will be nice to have around.

@ikosmidis
Copy link
Owner

@ikosmidis ikosmidis commented Mar 29, 2018

Ah yes; that's important thanks. Full LinkingTo support is now on GitHub and will be on CRAN in the next release in a few weeks.

screen shot 2018-03-29 at 01 15 17

@ikosmidis ikosmidis closed this in 6b8f92e Mar 29, 2018
@eddelbuettel
Copy link
Author

@eddelbuettel eddelbuettel commented Mar 29, 2018

Nice. Thank you.

Can your extractors also combine, ie do what CRAN does and use

  Depends OR Imports OR LinkingTo 

all of which are hard dependencies?

@ikosmidis
Copy link
Owner

@ikosmidis ikosmidis commented Mar 29, 2018

Yes. I wrote the plot method for summary to be totally agnostic to the statistic to be bar-plotted. So, (using the development version for now) you can do

library("cranly")
package_db <- clean_CRAN_db()
package_network <- build_network(package_db)
package_summaries <- summary(package_network, advanced = FALSE)
package_summaries$n_hard <- with(package_summaries, { 
                                        n_linked_by + n_depended_by + n_imported_by
})
plot(package_summaries, top = 30, according_to = "n_hard")

Is this what you are after?

screen shot 2018-03-29 at 03 33 37

@eddelbuettel
Copy link
Author

@eddelbuettel eddelbuettel commented Mar 29, 2018

Excellent -- that corresponds to the result we get via the pagerank package by @andrie. Maybe add a filter to remove R Base / R Recommended packages?

@ikosmidis
Copy link
Owner

@ikosmidis ikosmidis commented Mar 29, 2018

@ikosmidis
Copy link
Owner

@ikosmidis ikosmidis commented Mar 29, 2018

Done in #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.