What are "reverse dependencies" in R?
Asked Answered
C

3

14

I have to install the rjson package in R and looking at the CRAN page that deals with the package I saw that rjson has different dependencies:

  • Reverse depends: couchDB, df2json, edeR, gooJSON, indicoio, kintone, notifyR, RDSTK, Rfacebook, rJython, Rlabkey, rPlant, RYoudaoTranslate, SmarterPoland, sotkanet, source.gist, Storm, streamR, tibbrConnector, zendeskR;

  • Reverse imports: AntWeb, argparse, BerlinData, blsAPI, Causata, d3Network, db.r, geonames, GetoptLong, ggmap, h2o, helsinki, james.analysis, meteoForecast, mpoly, networkD3, ngramr, nhlscrapr, OpasnetUtils, OutbreakTools, paleobioDB, RAdwords, rbefdata, rClinicalCodes, rfisheries, rglobi, RIGHT, rnrfa, solr, StereoMorph, structSSI, twitteR, vdmR, yhatr;

  • Reverse suggests: fuzzyMM, GSIF, installr, mlr, plotKML, rsnps, sorvi, trajectories;

What is the difference among them and do I have to install all of them to use the rjson package?

Curettage answered 10/4, 2015 at 17:42 Comment(0)
A
13

These are reverse dependencies, that is these packages depend on rjson. You do not have to install these in order to use rjson.

Looking at the DESCRIPTION file (this is where the dependencies are stated) you see only:

Depends: R (>= 3.1.0)

So rjson package needs only R newer or equal than 3.1.0 to run.

Ainslie answered 10/4, 2015 at 17:59 Comment(0)
B
3

Just as EDi has stated, the list states packages that depend on rjson. I think kintone has been knocked off the list, since the cloud service itself is not dependent on rjson. The R SDK for kintone though, is dependent on rjson, as shown in the README of the GitHub page.

So in this case, if I wanted to run kintone's APIs using this R SDK, I would also need the rjson package for it to work properly.

Bankhead answered 7/9, 2016 at 8:53 Comment(0)
I
0

The easiest method of finding the actual (not just documented in CRAN) reverse dependencies of a given R package is by using dependsOnPkgs() function from the tools R library (see docs).

For example:

library(tools)

> cat(sort(tools::dependsOnPkgs("webshot")))
amanida BayesianNetwork behaviorchange CALANGO covid19sf dlookr heatmaply IntLIM iotables kableExtra LifeInsuranceContracts makepipe manipulateWidget mapedit mapview modelsummary nomnoml RGISTools tab ufs wilson

As compared with the CRAN documentation for the downstream webshot library:

Reverse dependencies:

Reverse imports: antaresViz, ari, BETS, BioM2, flow, GALLO, heatmaply, kableExtra, manipulateWidget, namedropR, nomnoml, oceanis, oncrawlR, PathoStat, Prostar, reactablefmtr, tableHTML, tidycwl, trelliscopejs, vegalite

Reverse suggests: asteRisk, autoshiny, bayesPO, BED, behaviorchange, bookdown, CIMICE, codebook, drake, ELMER, enrichTF, esATAC, ggiraphExtra, hablar, HYPEtools, iheatmapr, knitr, lavaanExtra, makepipe, mapview, microPop, modeltime, MODIStsp, NGLVieweR, optimall, pGRN, pkgnet, plotly, r2d3, radiant.data, rENA, rtweet, sdcTable, sentopics, simlandr, sortable, sparrow, spectralAnalysis, starsTileServer, tiler, ubiquity, validata, visNetwork, wordcloud2, xpose

[source: CRAN]

As we see from the above example, the reverse dependencies lists on CRAN are only loosely connected to the actual dependency graph (here: in an environment containing a representative "sample" of all 4.9k R libraries from CRAN Task Views), and not just "reverse imports", but also "reverse suggests" lists may contain actual reverse dependencies that would likely break without the downstream package (here: webshot).

Illiteracy answered 15/10, 2023 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.