stevecondylios / collidr Goto Github PK
View Code? Open in Web Editor NEWCheck for namespace collisions across a half a million functions on CRAN ๐ฅ
Home Page: https://stevecondylios.github.io/collidr/
License: Other
Check for namespace collisions across a half a million functions on CRAN ๐ฅ
Home Page: https://stevecondylios.github.io/collidr/
License: Other
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.
Being able to gauge the popularity of a package can help when making judgement calls around whether a collision is acceptable.
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
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.