reinstallr icon indicating copy to clipboard operation
reinstallr copied to clipboard

Other patterns for finding required packages

Open noamross opened this issue 8 years ago • 6 comments

This is great! I suggest, in addition to looking for packages that are called via library(packagename), you also look for:

  • require(packagename)
  • packagename::function
  • import::from("packagename", ...)

noamross avatar May 11 '16 19:05 noamross

Yes, that's right. I also considered parsing DESCRIPTION.

I adjust the function as soon as I find some time. But I won't be sorry, when someone is quicker. :-)

calligross avatar May 11 '16 20:05 calligross

Might be nice to also look for rstudio add-ins. Actually I had your great add-in ggThemeAssist before upgrading to 3.3 and reinstallr didn't spot it. Is it expected?

ginolhac avatar May 12 '16 14:05 ginolhac

The problem with most add-ins is, that you have no library() etc. call for them in any source files. Those they are hard to spot.

calligross avatar May 12 '16 15:05 calligross

ok @calligross I guess you wish it was easier. Nevermind, your tool is already very handy! Thanks.

ginolhac avatar May 13 '16 06:05 ginolhac

As a workaround: add for each add-in a library(add-in-package) in a *.R file.

calligross avatar May 13 '16 07:05 calligross

smart, will try to stick to this rule

ginolhac avatar May 13 '16 07:05 ginolhac