2011/8/22 Uwe Ligges <lig...@statistik.tu-dortmund.de> > > > On 22.08.2011 18:43, Rainer M Krug wrote: > >> Hi >> >> I want to create a dependence diagram of a subset of the packages on CRAN >> and would therefore like to read the DEACRIPTION files into a list. The >> list >> should be as follow for each package: >> >> - package name: list >> - Package: character >> - Version: character >> - Date: character >> - ... >> - Depends: character vector >> - Suggests: character vector >> - ... >> > > Some of these informations are collected in the CRAN repository's PACKAGES > file. If those are not sufficient, you can also read separate DESCRIPTIONS > files, of course. > > There is packageDescription() in utils for accessing installed packages' > DESCRIPTION information or just use read.dcf() to read the DESCRIPTION files > directly. > > Example: > as.list(read.dcf(system.file("**DESCRIPTION", package="tools"))[1,]) >
Thanks a lot - that works as wished. I have it working, I just have to work out some smart way of aranging the graph and to delete the versions from the dependency strings. > > > For the dependency diagram, see > dependsOnPkgs() and .package_dependencies() (the latter internal) in > package tools, as well as what these guys wrote: > Theußl, S., Ligges, U. and Hornik, K. (2011): Prospects and Challenges in R > Package Development. Computational Statistics 26 (3), 395-404. > Nice - I am thinking about the same kind of graphs. I will post some graphs here as as soon as they loo nice, Cheers, Rainer > > Uwe Ligges > > > > > > > > > I downloaded all packages and extracted all DESCRIPTION, but I am >> struggling >> with the creation of the list (I tried using scan(what=list(), >> multi.line=TRUE) with different things in list()). Before I spend to much >> time on it, is there a function which could help me or has somebody done >> something similar (I assume the DESCRIPTION file ust be somewhere be read >> dueing install.packages()? >> >> Cheers, >> >> Rainer >> >> >> -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug [[alternative HTML version deleted]]
______________________________________________ R-help@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.