[R] Checking package licences including dependencies?

Allan Engelhardt allane at cybaea.com
Tue Jul 27 17:51:14 CEST 2010


Great, thanks.  I couldn't quite get your syntax to work, but

z <- packageStatus(.libPaths()[1])[[1]]
unname( z$Package[z$Status == "unavailable"] )

seems to do the trick for me.

Thanks again.

Allan

On 27/07/10 16:31, Prof Brian Ripley wrote:
> If I understand you correctly, set the filter and use packageStatus().
> Its summary() method tells you which packages you have installed which 
> are 'unavailable'.  E.g. my Mac (with pkgType = "source") shows in 
> R-devel
>
> summary(packageStatus(.libPaths()[1]))$Libs[[1]]$unavailable
>  [1] "BayesX"    "EVER"      "TSA"       "akima"     "degreenet" "difR"
>  [7] "ergm"      "ff"        "gam"       "isa2"      "latentnet" "locfit"
> [13] "mapproj"   "rtiff"     "statnet"   "tripack"
>
> On Tue, 27 Jul 2010, Allan Engelhardt wrote:
>
>> I only recently discovered options("available_packages_filters" = 
>> list(add = TRUE, "license/FOSS")) [cf. help("available.packages", 
>> package="utils") in R 2.10.0 or later] which goes nicely with my 
>> options("checkPackageLicense" = TRUE) [new in R 2.11].
>>
>> But now I want to purge my library of packages I would not have 
>> installed had I known about this option earlier (I'm looking at you, 
>> "gam"!).
>>
>> Short of erasing the whole directory of libraries and re-installing 
>> it, is there an easy way of achieving this?
>>
>> I could probably roll something based on tools:::analyze_license() 
>> but I think the erase-and-reinstall option might be easier in this 
>> case :-)
>>
>> Allan
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>



More information about the R-help mailing list