"Navigating the R package jungle" • Jungles -- rain forests -- are places rich in resources. ◦ more than 10 000 packages in CRAN ◦ many vignettes and Blogs ◦ more stuff in Bioconductor, Github, and other collections • Resources are often difficult to find • Forest is usually hard to navigate Navigating R Packages | useR! Brussels JN
challenge • Wrappers -- packages that unify the call to a number of resources for a common set of tasks (JN) • Task Views -- Guidance on resources and how their development, timeliness and accessibility can be improved (JS) • Search -- improving how users can find the tools they need and information on how to use them effectively and efficiently ◦ The “sos” package (SG) ◦ Rdocumentation (LV) ◦ RStudio CRANsearcher • MORE – you! JN
via an example: "optimization" (function minimization) • optim(), nlm() and nlminb() in base R • quite large number of individual packages: BB, dfoptim, Rcgmin, Rvmmin, Rtnmin, lbfgs, lbfgs3, trust, trustOptim, nloptr, minqa, powell, and others • MANY and DIFFERENT calling sequences • MANY control parameters, some with same name but different function, others with different names for same functionality JN
optimrx (prev. optimx) • function optimr() uses optim() calling sequence with more choices for "method=" • ongoing development • extra functions opm(), multistart(), polyopt() JN
gloptim (Hans Werner Borchers) global / stochastic optimization • bbmle (Ben Bolker) some integration of tools for maximum likelihood estimation • jmv (Jamovi) (Jonathan Love) attempts to integrate many common statistical tests • Have I missed good examples? Let me know! (nashjc _at_ uottawa.ca) JN
Principal Components / svd -- (JN and Claudia Beleites) https://gitlab.com/nashjc/svdpls • Nonlinear modeling -- better integration of nls(), packages **nlsr**, **nls2** and **minpack.lm**, though the gains may be small • Are there opportunities to simplify or streamline the user experience with database access? With data manipulation and display (plyr, dplyr, tables, others)? Navigating R Packages | useR! Brussels JN
conceal packages • Do we need to see a list of all packages as a default in CRAN? • Lists by task or application? • Lists by "popularity" of call? (Paul Gilbert 2piQA) • Hide "infrastructure" packages from general users • Omit some "junk" from the streamlined lists • Note that such lists can be external to CRAN, i.e., wrappers Navigating R Packages | useR! Brussels JN
Form groups to identify opportunities in unification, guidance or search • Encourage/start projects to actually try out ideas • Note Google Summer of Code and R Foundation initiatives • https://github.com/nashjc/Rnavpkg/ • https://github.com/nashjc/Rnavpkg/wiki Navigating R Packages | useR! Brussels JN
R users • There are many resources out there for many differents kinds of tasks • It can be difficult to find what you are looking for • Assessing quality can be a challenge Navigating R Packages | useR! Brussels JS
package developers • Most R users are open to trying out new packages • There are so many packages that it can be difficult to connect with your audience Navigating R Packages | useR! Brussels JS
the UNOFFICIAL VERSIONS Sometimes package developers and users put together Task Views on their own Check out Ben Marwick’s archeology CTV or Thomas Leeper’s open data CTV Navigating R Packages | useR! Brussels JS
Task View maintainers • Making (and keeping!) a Task View useful can be a challenge • Task Views vary in how helpful and up-to-date they are • Could more CTVs move to being maintained on GitHub or a Wiki? • Two possible approaches for CTVs + GitHub ◦ Editing a markdown file and using makefiles to get to XML ◦ Editing XML and using a pretty simple script to get to markdown Navigating R Packages | useR! Brussels JS
install.packages("CRANsearcher") Functionality • Search CRAN database based on keyword(s) ◦ Searches the package name, title, and **description** • Filter by most recent release date • Link to websites to learn more • Install selected package(s) with the click of a button Navigating R Packages | useR! Brussels JS
“RSiteSearch” database for matches in help pages • Sorts the results to put first the package with the most matches • writeFindFn2xls to produce a package summary ◦ required installing packages locally to get some of the information needed ◦ Not well known Navigating R Packages | useR! Brussels SG
packages ➔ Make it easy to just find what you need ➔ Documentation is written by experts for experts ◆ Provide a user-friendly, welcoming interface for R beginners ◆ Community-driven documentation via examples ➔ Central documentation repository (CRAN/BioC/GitHub) ➔ Find older versions of packages Navigating R Packages | useR! Brussels
R Packages | useR! Brussels 1. Search 2. Content 3. Community ➔ Up to date ➔ Easy to browse ➔ Exhaustive ➔ Older versions are browsable ➔ Community members can post high-quality, interactive examples. ➔ Leaderboard ➔ R package
useR! Brussels ➔ Browse source code ➔ RDocs Light ◆ “Hover” widget to include minimal version of the doc on any website ➔ Increase community engagement ◆ Some contributors post examples but that’s not enough ◆ What would you want to see ? Wanna help ? Feel free to contribute and post new issues/ideas on: ➔ https://github.com/datacamp/RDocumentation-app RDocumentation is completely open-source!
useR! Brussels BREAKOUT SESSIONS • Unification: John Nash in Plenary • Search: Spencer Graves in 3.02 • Guidance: Julia Silge in 2.02 https://github.com/nashjc/Rnavpkg