Welcome!

Industrial IoT Authors: Elizabeth White, Stackify Blog, Yeshim Deniz, SmartBear Blog, Liz McMillan

Blog Feed Post

Revisiting package dependencies

by Andrie de Vries In my previous post I wrote about how to identify and visualize package dependencies.  Within hours, Duncan Murdoch (member of R-core) identified some discrepancies between my list of dependencies and the visualisation.  Since then, I fixed the dispecrancies. In this blog post I attempt to clarify the issues involved in listing package dependencies. In miniCRAN I expose two functions that provides information about dependencies: The function pkgDep() returns a character vector with the names of dependencies. Internally, pkgDep() is a wrapper around tools::package_dependencies(), a base R function that, well, tells you about package dependencies. My new function is in one way a convenience, but more importantly it sets different defaults (more about this later). The function makeDepGraph() creates an igraph representation of the dependencies. Take a look at some examples.  I illustrate with the the package chron, because chron neatly illustrates the different roles of Imports, Suggests and Enhances: chron Imports the base packages graphics and stats. This means that chron internally makes use of graphics and stats and will always load these packages. chron Suggests the packages scales and ggplot2. This means that chron uses some functions from these packages in examples or in its vignettes.  However, these functions are not necessary to use chron chron Enhances the package zoo, meaning that it adds something to zoo packages. These enhancements are made available to you if you have zoo installed. The function pkgDep() exposes not only these dependencies, but also also all recursive dependencies. In other words, it answers the question which packages need to be installed to satsify all dependencies of dependencies. This means that the algorithm is as follows: First retrieve a list of Suggests and Enhances, using a non-recursive dependency search Next, perform a recursive search for all Imports, Depends and LinkingTo The resulting list of packages should then contain the complete list necessary to satisfy all dependencies. In code: > library(miniCRAN) > tags <- "chron" > pkgDep(tags, suggests=FALSE, enhances=FALSE, includeBasePkgs = TRUE) [1] "chron" "graphics" "stats" > pkgDep(tags, suggests = TRUE, enhances=FALSE) [1] "chron" "RColorBrewer" "dichromat" "munsell" "plyr" "labeling" [7] "colorspace" "Rcpp" "digest" "gtable" "reshape2" "scales" [13] "proto" "MASS" "stringr" "ggplot2" > pkgDep(tags, suggests = TRUE, enhances=TRUE) [1] "chron" "RColorBrewer" "dichromat" "munsell" "plyr" "labeling" [7] "colorspace" "Rcpp" "digest" "gtable" "reshape2" "scales" [13] "proto" "MASS" "stringr" "lattice" "ggplot2" "zoo" Created by Pretty R at inside-R.org To create an igraph plot of the dependencies, you can use the function makeDepGraph() and plot the results:  set.seed(1) plot(makeDepGraph(tags, includeBasePkgs=FALSE, suggests=TRUE, enhances=TRUE), legendPosEdge = c(-1, 1), legendPosVertex = c(1, 1), vertex.size=20) Created by Pretty R at inside-R.org Note how the dependencies expand to zoo (enhanced), scales and ggplot (suggested) and then recursively from there to get all the Imports and LinkingTo dependencies. In my previous post I tried to plot the most popular package tags on StackOverflow.  Using the updated functionality in the miniCRAN functions, it is easier to understand the structure of the dependencies:  > tags <- c("ggplot2", "data.table", "plyr", "knitr", + "shiny", "xts", "lattice") > pkgDep(tags, suggests = TRUE, enhances=FALSE) [1] "ggplot2" "data.table" "plyr" "knitr" "shiny" "xts" [7] "lattice" "digest" "gtable" "reshape2" "scales" "proto" [13] "MASS" "Rcpp" "stringr" "RColorBrewer" "dichromat" "munsell" [19] "labeling" "colorspace" "evaluate" "formatR" "highr" "markdown" [25] "mime" "httpuv" "caTools" "RJSONIO" "xtable" "htmltools" [31] "bitops" "zoo" "SparseM" "survival" "Formula" "latticeExtra" [37] "cluster" "maps" "sp" "foreign" "mvtnorm" "TH.data" [43] "sandwich" "nlme" "Matrix" "bit" "codetools" "iterators" [49] "timeDate" "quadprog" "Hmisc" "BH" "quantreg" "mapproj" [55] "hexbin" "maptools" "multcomp" "testthat" "mgcv" "chron" [61] "reshape" "fastmatch" "bit64" "abind" "foreach" "doMC" [67] "itertools" "testit" "rgl" "XML" "RCurl" "Cairo" [73] "timeSeries" "tseries" "its" "fts" "tis" "KernSmooth" > set.seed(1) > plot(makeDepGraph(tags, includeBasePkgs=FALSE, suggests=TRUE, enhances=TRUE), + legendPosEdge = c(-1, -1), legendPosVertex = c(1, -1), vertex.size=10, cex=0.5) Created by Pretty R at inside-R.org After my previous post, Duncan Murdoch pointed out that the package rgl, suggested by knitr, appeared in the list, but not in the plot.  This new version of the function fixes this bug, which was introduced because I retrieved the suggests dependencies incorrectly:  EDIT: A few hours ago the miniCRAN went live on CRAN.  Find miniCRAN at http://cran.r-project.org/web/packages/miniCRAN/index.html  

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

IoT & Smart Cities Stories
Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform and how we integrate our thinking to solve complicated problems. In his session at 19th Cloud Expo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and sh...
What are the new priorities for the connected business? First: businesses need to think differently about the types of connections they will need to make – these span well beyond the traditional app to app into more modern forms of integration including SaaS integrations, mobile integrations, APIs, device integration and Big Data integration. It’s important these are unified together vs. doing them all piecemeal. Second, these types of connections need to be simple to design, adapt and configure...
Cloud computing delivers on-demand resources that provide businesses with flexibility and cost-savings. The challenge in moving workloads to the cloud has been the cost and complexity of ensuring the initial and ongoing security and regulatory (PCI, HIPAA, FFIEC) compliance across private and public clouds. Manual security compliance is slow, prone to human error, and represents over 50% of the cost of managing cloud applications. Determining how to automate cloud security compliance is critical...
Contextual Analytics of various threat data provides a deeper understanding of a given threat and enables identification of unknown threat vectors. In his session at @ThingsExpo, David Dufour, Head of Security Architecture, IoT, Webroot, Inc., discussed how through the use of Big Data analytics and deep data correlation across different threat types, it is possible to gain a better understanding of where, how and to what level of danger a malicious actor poses to an organization, and to determin...
Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
DXWorldEXPO LLC announced today that Telecom Reseller has been named "Media Sponsor" of CloudEXPO | DXWorldEXPO 2018 New York, which will take place on November 11-13, 2018 in New York City, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.