Thursday, September 30, 2021 From rOpenSci (https://ropensci.org/blog/2021/09/30/ropensci-news-digest-september-2021/). Except where otherwise noted, content on this site is licensed under the CC-BY license.
Dear rOpenSci friends, it’s time for our monthly news roundup!
You can read this post on our blog. Now let’s dive into the activity at and around rOpenSci!
A first package was submitted to rOpenSci Statistical Software Peer Review, two months after its opening: the tsbox package by Christoph Sax. We are very excited, and thankful for the opportunity to hone our new software review tooling!
We’ve made it easier to browse our website by adding some basic search from the navbar. The search isn’t on the full content, but on page titles and descriptions. We hope it’ll help you find what you’re after! Other ways to find an rOpenSci related thing you vaguely remember is by asking us, searching through our website source or using your favourite search engine.
Our next Social Coworking and Office Hours is Tuesday, October 5th, 9 AM Australian Western / 1:00 UTC, and hosted by Nicholas Tierney. Find out about more events.
The following three packages recently became a part of our software suite:
allodb, developed by Erika Gonzalez-Akre together with Camille Piponiot, Mauro Lepore, Kristina Anderson-Teixeira: Tool to standardize and simplify the tree biomass estimation process across globally distributed extratropical forests. It has been reviewed by Jeffrey Hanson, Jonas Stillhard.
jagstargets, developed by William Michael Landau: Bayesian data analysis usually incurs long runtimes and cumbersome custom code. A pipeline toolkit tailored to Bayesian statisticians, the jagstargets R package is leverages targets and R2jags to ease this burden. jagstargets makes it super easy to set up scalable JAGS pipelines that automatically parallelize the computation and skip expensive steps when the results are already up to date. Minimal custom code is required, and there is no need to manually configure branching, so usage is much easier than targets alone. For the underlying methodology, please refer to the documentation of targets doi:10.21105/joss.02959 and JAGS (Plummer 2003) https://www.r-project.org/conferences/DSC-2003/Proceedings/Plummer.pdf. It has been reviewed by David Lawrence Miller, Ernest Guevarra.
slopes, developed by Robin Lovelace together with Rosa Félix, Joey Talbot: Functions and example data to support research into the slope (also known as longitudinal gradient or steepness) of linear geographic entities such as roads doi:10.1038/s41597-019-0147-x and rivers doi:10.1016/j.jhydrol.2018.06.066. The package was initially developed to calculate the steepness of street segments but can be used to calculate steepness of any linear feature that can be represented as LINESTRING geometries in the sf class system. The package takes two main types of input data for slope calculation: vector geographic objects representing linear features, and raster geographic objects with elevation values (which can be downloaded using functionality in the package) representing a continuous terrain surface. Where no raster object is provided the package attempts to download elevation data using the ceramic package. It has been reviewed by Dan Olner, Andy Teucher.
Discover more packages, read more about Software Peer Review.
The following fifteen packages have had an update since the latest newsletter: gert (v1.4.0
), pkgstats (v0.0.1
), beastier (v2.4.8
), c14bazAAR (3.1.0
), DataSpaceR (v0.7.5
), drake (7.13.3
), europepmc (v0.4.1
), NLMR (v0.6
), nlrx (v0.4.3
), qualtRics (v3.1.5
), rebird (v1.3.0
), rfishbase (slb-21.08
), tarchetypes (0.3.1
), targets (0.8.0
), tidyhydat (0.5.4
).
There are fifteen recently closed and active submissions and 5 submissions on hold. Issues are at different stages:
Three at ‘6/approved’:
allodb, Tree Biomass Estimation at Extratropical Forest Plots. Submitted by Erika Gonzalez-Akre.
jagstargets, Targets for JAGS Workflows. Submitted by Will Landau.
slopes, Calculate Slopes of Roads, Rivers and Trajectories. Submitted by RFlx.
One at ‘5/awaiting-reviewer(s)-response’:
Four at ‘4/review(s)-in-awaiting-changes’:
excluder, Checks for Exclusion Criteria in Online Data. Submitted by Jeffrey Stevens.
gendercoder, Recodes Sex/Gender Descriptions Into A Standard Set. Submitted by Emily Kothe.
healthdatacsv, Access data in the healthdata.gov catalog. Submitted by iecastro.
chemspiderapi, R Wrapper for ChemSpider’s API Services. Submitted by Raoul Wolf.
Four at ‘3/reviewer(s)-assigned’:
cffr, Generate Citation File Format (cff) Metadata for R Packages. Submitted by Diego H..
ROriginStamp, Interface to OriginStamp API to Obtain Trusted Time Stamps. Submitted by Rainer M Krug.
epair, Grabs data from EPA API, simplifies getting pollutant data. Submitted by Leo Orozco-Mulfinger.
occCite, Querying and Managing Large Biodiversity Occurrence Datasets. Submitted by Hannah Owens.
One at ‘2/seeking-reviewer(s)’:
Two at ‘1/editor-checks’:
tsbox, Class-Agnostic Time Series. Submitted by Christoph Sax. (Stats).
rdbhapi, Interface to DBH-API. Submitted by Marija Ninic.
Find out more about Software Peer Review, including how to get involved.
Creando Tu R-universe by Yanina Bellini Saibene. En este post te explico como crear tu r-universe, a partir de la experiencia de crear el mio.
The Story Behind rspatialdata by Dilinie Seimon, Varsha Ujjinni Vijay Kumar. rspatialdata: tutorials for working with spatial data using R, featuring many rOpenSci packages.
rOpenSci docs are now built on r-universe by Jeroen Ooms. As of today, the pkgdown sites for all rOpenSci packages on our docs server are built on r-universe.
How to Use System Commands in your R Script or Package by Jeroen Ooms, Maëlle Salmon. Ways (not) to call the system from your R package. This post was featured in the R Weekly Highlights podcast by Eric Nantz.
Three use cases of our packages and resources have been reported since we sent the last newsletter.
Bayesian Regression Analysis with Rstanarm (with GSODR for supporting data). Reported by Adam Sparks.
Slicing an image with magick for artistic effect. Reported by Georgios Karamanis.
Using stplanr to find shortest road network distance to a TB treatment clinic from a TB patients’ household. Reported by McEwen Khundi.
Explore other use cases and report your own!
There’s no open call for new maintainers at this point but you can refer to our contributing guide for finding ways to get involved!
As the maintainer of an rOpenSci package, feel free to contact us on Slack or email [email protected]
to get your call for maintainer featured in the next newsletter.
Some useful tips for R package developers. 👀
Short anti-struggle list:
Struggling to write graceful R package examples for CRAN?
Let’s remind you of @examplesIf
in the latest roxygen2
.
Struggling with GitHub Actions and dependencies installed from an additional repository? (E.g. an R-universe repository?)
The r-lib setup-r action now has a extra-repositories
input.
Struggling with encoding in particular a NOTE about UTF-8 strings? Read the related thread on our forum.
How to test code run by callr, while having tests contribute to code coverage? covr modifies the code through injecting tracing symbols and running as its own temporary and definitely self-contained process. Any processes external to this, which includes anything via callr, cannot be traced. This is an entirely standard condition of any code tracing algorithm. A good tip is to ensure everything inside a callr call is bundled as a simple function that can be tested in tests without the callr wrapper.
Another challenge for testing might be interactive behavior.
For Shiny apps you might look into shinytest, for anything happening in the browser you might enjoy chromote or crrri.
You can also resort to mocking.
For code that’s supposed to be only run in interactive sessions, you might use rlang functions in particular the rlang::is_interactive()
in code and tests.
You can look at the targets testing suite for external processes and usethis manual tests.
Now about real testers, i.e. the users! 😉
To help them use your package optimally, you have to write a nice interface, good docs (including system requirements), informative error messages, etc.
Have you also considered adding some sort of sitrep (situation report) function?
The devtools package has devtools::dev_sitrep()
e.g. reports on the package development situation, with clear hints given if something is not quite right.
The usethis package has usethis::git_sitrep()
(using the gert package under the hood!), blogdown has blogdown::check_site()
.
Good candidates for checks are common pain points, so finding them might require some sort of external perspective on your package.
Thanks for reading! If you want to get involved with rOpenSci, check out our Contributing Guide that can help direct you to the right place, whether you want to make code contributions, non-code contributions, or contribute in other ways like sharing use cases.
If you haven’t subscribed to our newsletter yet, you can do so via a form. Until it’s time for our next newsletter, you can keep in touch with us via our website and Twitter account.