Welcome!

Web 2.0 Authors: Esmeralda Swartz, Tim Hinds, Kevin Benedict, Pat Romanski, Michael Bushong

Blog Feed Post

A look at the distribution of R package dependencies

by Joseph Rickert For a knitty gritty look at what’s new with R there is no better place to start than Dirk Eddelbuettel’s CRANberries site. Since 2007, the site has been reliably providing near real-time status on CRAN packages. Now, every two hours, CRANberries displays updated information on new R packages, updated R packages and R packages that have been removed. The following is a partial view of today’s CRAN: New page. (Since we first featured this site on the Revolutions blog Dirk has spruced up its looks and added a twitter feed.) Referring to his site in the About page Dirk states: “There is not much to it, R already gives us a function available.packages().The part about there not being much to it is clearly an understatement: Dirk has harnessed a good bit of technology and a significant amount of know how to make things work smoothly. However, it is the case that available.packages() is a pretty amazing function. available.packages() links to CRAN and returns a boatload of information about the packages there including name, version, Depends, Imports, Suggests and much more.  As first exercise, I thought it would be interesting to look just at the Depends field, which as the Writing R Extensions Manual explains, gives a comma-separated list of package names which a given package depends on, and can also specify a dependence on a certain version of R. The following histogram shows a single snapshot of the distribution of the number of dependencies in CRAN packages.   (Download Depends to get the code for the histogram.) Most packages have fewer than 3 dependencies (median = 2), but there are 33 packages that have 10 or more. The winner is the sisus package for "source partitioning using stable isotopes" with 19 dependencies. The help file for the function indicates that it is possible to get even more package information than is included in the default settings. available.packages() provides a window into CRAN and R that with a little work could provide some real insight into the structure of R packages.

Read the original blog entry...

More Stories By David Smith

David Smith is Vice President of Marketing and Community at Revolution Analytics. He has a long history with the R and statistics communities. After graduating with a degree in Statistics from the University of Adelaide, South Australia, he spent four years researching statistical methodology at Lancaster University in the United Kingdom, where he also developed a number of packages for the S-PLUS statistical modeling environment. He continued his association with S-PLUS at Insightful (now TIBCO Spotfire) overseeing the product management of S-PLUS and other statistical and data mining products.<

David smith is the co-author (with Bill Venables) of the popular tutorial manual, An Introduction to R, and one of the originating developers of the ESS: Emacs Speaks Statistics project. Today, he leads marketing for REvolution R, supports R communities worldwide, and is responsible for the Revolutions blog. Prior to joining Revolution Analytics, he served as vice president of product management at Zynchros, Inc. Follow him on twitter at @RevoDavid