rOpenSci | rOpenSci News Digest, February 2023

rOpenSci News Digest, February 2023

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!

🔗 rOpenSci HQ

🔗 R-universe improvements!

We have changed the preferred git repo name where you host your packages.json registry for R-universe, see our post New preferred repo name for r-universe registries. We now recommend to use the full lowercase name of your R-universe domain as the repo name, for instance TileDB-Inc/tiledb-inc.r-universe.dev.

Speaking of domains and URLs, we have improved the URL schema for the r-universe.dev front-end to make it even easier to find and share a link to an R package, article, API, or other resource.

🔗 Coworking

Join us for social coworking & office hours monthly on first Tuesdays! Hosted by Steffi LaZerte and various community hosts. Everyone welcome. No RSVP needed. Consult our Events page to find your local time and how to join.

And remember, you can always cowork independently on work related to R, work on packages that tend to be neglected, or work on what ever you need to get done!

🔗 Community Call {targets} in Action

On January 31 we enjoyed a Community Call about the targets package.

As the name of the call indicates, we had three presentations where the speakers shared their experiences putting targets into action.

Eric Scott started the panel, sharing his attempt to make it easy to set up targets to harness the power of HPC from the comfort of an RStudio window. Next, Joel Nitta talked about using targets for bioinformatics pipelines, and finally Will Landau demonstrated how to debug {targets} pipelines.

You can see the video and access to all the material (slides, code, and shared notes with transcription and Q&A) on the community call webpage.

What would YOU like to hear about in an rOpenSci Community Call?, let us know.

🔗 The Champions Program is off to a great start in 2023!

We started the 2023 activities of our champions program with two kick-off meetings.

During these meetings, mentors and champions introduced themselves, shared where they are from, what their project is about, and something that excites them about the program. We also went over the logistics of the program, the potential agenda, and scheduled activities.

We have a diverse group of people from Argentina, Brazil, Peru, Nigeria, Turkey, Australia, France, Norway, Saudi Arabia, the United States, and the United Kingdom.

We’re excited to share that three of our champions will develop a new package, four will prepare and submit their package to the review process, and three will become rOpenSci reviewers. Mentors will work with their mentees throughout the process of executing their projects.

It was lovely to see the participants’ enthusiasm to learn, share, execute their projects, and give back to the community!

Stay tuned for more information about our mentors, champions, and their projects!

🔗 Software 📦

🔗 New package

The following package recently became a part of our software suite:

  • rb3, developed by Wilson Freitas together with Marcelo Perlin: Download and parse public files released by B3 and convert them into useful formats and data structures common to data analysis practitioners. It is available on CRAN. It has been reviewed by Pachá (aka Mauricio Vargas Sepúlveda) and Mario Gavidia Calderón.

Discover more packages, read more about Software Peer Review.

🔗 New versions

The following sixteen packages have had an update since the last newsletter: cffr (v0.4.1), datefixR (v1.4.1), dynamite (1.2.0), excluder (v0.5.0), fingertipsR (v1.0.10), gittargets (0.0.6), hoardr (v0.5.3), ijtiff (v2.3.0), opentripplanner (v0.5.1), osmdata (v0.2.0), readODS (cran_v1.8), ReLTER (2.1.1), rerddap (v1.0.2), ruODK (v1.4.0), terrainr (v0.7.4), and visdat (v0.6.0).

🔗 Software Peer Review

There are fourteen recently closed and active submissions and 2 submissions on hold. Issues are at different stages:

Find out more about Software Peer Review and how to get involved.

🔗 On the blog

🔗 Software Review

🔗 Other topics

🔗 Tech Notes

🔗 Call for maintainers

🔗 Call for maintainers

If you’re interested in maintaining any of the R packages below, you might enjoy reading our blog post What Does It Mean to Maintain a Package? (or listening to its discussion on the R Weekly highlights podcast hosted by Eric Nantz and Mike Thomas)!

  • citesdb, a high-performance database of shipment-level CITES trade data. Provides convenient access to over 40 years and 20 million records of endangered wildlife trade data from the Convention on International Trade in Endangered Species of Wild Fauna and Flora, stored on a local on-disk, out-of memory ‘DuckDB’ database for bulk analysis. Issue for volunteering.

🔗 Call for comaintainers

  • rtweet, that interfaces Twitter API, is looking for a co-maintainer.

  • Refer to our recent blog post to identify other packages where help is especially wished for!

🔗 Package development corner

Some useful tips for R package developers. 👀

🔗 New CRAN guideline on CITATION file

CRAN requires CITATION files to be declared as bibentry items, and not in the previously-accepted form of citEntry(). As an example see the dynamite CITATION file which refers to the R manual as well as other associated publications.

🔗 Reference organization: the @family tag

In a package with more than a few help topics, reference organization is key to the user’s experience. Alphabetical order is rarely informative. 😉 A powerful tool for organizing both the local and pkgdown reference is the @family tag.

#' @family datawrangling
  • Locally it populates the “See also” section. You can tweak the title of the See also section for it not to be, say, “Other datawrangling” but rather “Data wrangling functionality”, by having in man/roxygen/meta.R:
list(
  rd_family_title = list(datawrangling = "Data wrangling functionality")
)
  • In the pkgdown configuration for the reference index you can use topic matching helpers such as has_concept() and lacks_concepts().

🔗 Gotcha: invisible() needs return()

The official man entry for invisible() says that it:

Return[s] a (temporarily) invisible copy of an object"

This might make it sound like invisible() directly implements an active return function, which it does not. While not strictly wrong, this statement is potentially misleading, especially followed as it is by the Details:

This function can be useful when it is desired to have functions return values which can be assigned, but which do not print when they are not assigned.

invisible() will only directly return from a function when it is wrapped in an active return() statement: return(invisible()); or when it’s the very last line of the function code.

This is all very nicely explained by Peter Meissner on Stack Overflow.

🔗 A testing pattern: adding switches to your code

A recent R-hub blog post explains a pattern for testing your package’s behavior in for instance the absence of an internet connection, without turning off wifi. It consists in using an early return in a helper function based on the presence of a specifically named environment variable (MYPKG.TEST.NOINTERNET) and on setting that environment variable locally in a test through withr::local_envvar().

🔗 Code comments tips

Another R-hub blog post presents tips for writing as few comments as possible, while making the code as readable as possible.

🔗 Last words

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 Mastodon account.