duncantl/CodeDepends

Change slotname/api from "library" to "package"

Opened this issue · 1 comments

@mmaechler reached out to me and pointed out that a "library" in R is the set of installed packages which are loadable, and what library calls do, is actually load (and attach) the package. So the api points for setting and retrieving the set of packages used by the script being analyzed should use the package terminology, rather than the library terminology.

There are two possible solutions to this:

  1. Leave the slot as is but create accessors (which we should do anyway) which use the package terminology so that that is what the users actually interact with
  2. Actually change the slot name.

I think 1 would be sufficient but 1+2 would be the more "technically correct" solution, but could break existing code that grabs that slot directly. Code within the package could be search/replaced to be fixed, but scripts would have problems. I'm pretty sure given that the package JUST went on CRAN this would only break @duncantl, @nick-ulle, @clarkfitzg's code and my own code. What are your thoughts on this, guys?

Change to what you think is best, we'll adapt.