Checking package licences including dependencies?
On Tue, 27 Jul 2010, Allan Engelhardt wrote:
Great, thanks. I couldn't quite get your syntax to work, but
Did you use R-devel? The syntax has changed ... and that's why I said 'e.g.'.
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.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595