Giter Site home page Giter Site logo

stevecondylios / collidr Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 22.62 MB

Check for namespace collisions across a half a million functions on CRAN ๐Ÿ’ฅ

Home Page: https://stevecondylios.github.io/collidr/

License: Other

R 100.00%
cran cran-r r-programming

collidr's People

Contributors

collidr-user avatar stevecondylios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

collidrpackage

collidr's Issues

Provide an estimate of collision probability

In certain cases, a rough estimate of the probability of a collision would be handy.

E.g. here we want to name a function mm, but it isn't clear whether these potential collisions are likely or unlikely

library(collidr)
CRAN_collisions("mm")
$packages
character(0)

$functions
       package_names function_names
24188           brms             mm
37829       compactr             mm
43045          cregg             mm
111047          hett             mm
152326         mindr             mm
159947        mosaic             mm
204418    QuantumOps             mm
215116      regtools             mm

An estimate could be based on how often each library is used with each other library, based on bigquery dataset of R github repos, or, perhaps more easily, see CRAN packages' reverse depends/imports as a proxy for actual use of each package with each other package.

Provide number of downloads in output of CRAN_collisions()

Being able to gauge the popularity of a package can help when making judgement calls around whether a collision is acceptable.

Example

If search CRAN packages for functions named 'present'

collidr::CRAN_collisions("present", CRANdf = getCRAN())

we see 34 packages contain a function of that name

[1] "Retrieving CRAN data.."
[1] "Data last updated 2020-01-03 18:30:27 UTC"
$packages
character(0)

$functions
           package_names function_names
8016            alakazam        present
15031           animint2        present
19078        antaresRead        present
28380      augmentedRCBD        present
58301          CeRNASeek        present
61711          ChemoSpec        present
72153               cold        present
83176              cvGEE        present
90010             deldir        present
107064              dplR        present
139554   fivethirtyeight        present
160015           ggparty        present
189272      its.analysis        present
216668            MapGAM        present
226269         metacoder        present
235477             mistr        present
255366            NetMix        present
278640          partykit        present
299321         PredPsych        present
310647      pubmed.mineR        present
313997        PWFSLSmoke        present
325289           RAhrefs        present
332937            rcosmo        present
358489             Rnets        present
374933            rSHAPE        present
379530         RStoolbox        present
381455              rsvd        present
386804              sae2        present
390184          samurais        present
433109            statsr        present
452105            tigger        present
454147           timereg        present
463534            TSdist        present
468571 UncertainInterval        present

We now assess whether such a collision is acceptable. In doing so, having the number of downloads for each of these packages would be useful

Possible improvement to parsing exported functions

The default NAMESPACE file generated when creating a new package in RStudio will contain exportPattern("^[[:alpha:]]+")

The NAMESPACE file for each (and every) package on CRAN can be found by downloading the package source from the package index page on CRAN, unzipping, and untarring.

The regular expressions could be used to very accurately list exported functions on a per package basis.

Update return()

A new check in R-devel (part of --as-cran) looks for return without ():
this is reported on the CRAN results pages for fedora-clang and fedora-gcc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.