home.social

#rlang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #rlang, aggregated by home.social.

fetched live
  1. Want to use {pak} as backend for {renv} actions? Set the variable RENV_CONFIG_PAK_ENABLED = TRUE github.com/rstudio/renv/issues #renv #pak #reproducibility #RLang

  2. Here's a question for #rlang programmers: do y'all use the package `box` to handle namespaces?

    As someone who thinks R's handling of namespaces is hot garbage, this looks very good to me. However, I work with a lot of people who think standard "library/require" is a *good* pattern (i.e. the "namespace challenged") and I want to know if this package is used a lot?

    Or is your practice all `package::function()`?

    Or are there other solutions that I am missing?

    #r #rstats

    klmr.me/box/

  3. TIL (1) that R has a function called `dput()` that writes a text representation of an R object and (2) that a `c()` in an index will effectively flatten a mixture of indices. Hence:

    `dput(names(df)[c(1:4, 7)]`

    solves the problem of picking out a list of column names from a data frame and turning that into an object ready to insert into code. 🙃

    #rlang #r #rstats #datascience #dataanalysis

  4. "A little bit less than two years ago, building on work by Jim Hester and Kevin Ushey, Davis Vaughan completed a very impactful JavaScript file for the R community: an R grammar for the Tree-sitter parsing generator." by @rOpenSci

    ropensci.org/blog/2026/04/02/t

    #dataScience #rlang

  5. Wait! You can wrap pipelines in R in parentheses to directly use the last value?!?

    #rlang #tidyverse #R

  6. Want to use {pak} as backend for {renv} actions? Set the variable RENV_CONFIG_PAK_ENABLED = TRUE github.com/rstudio/renv/issues #renv #pak #reproducibility #RLang

  7. Having gotten my head fully around R pipes, I feel I need to write an article about it before I forget the fiddly details:

    |>, %>%, with(), lambdas, %$%, ...

    there are a lot of clever tricks for edge cases! (The with() hack I should have figured out for myself though!)

    Also, %$% -- the exposition pipe -- why didn't any of you tell me about this one!?!? You're slacking!

    #rlang #datascience #stats #statistics #rprogramming #tidyverse #tidydata #Rpipes #pipes!

  8. Fresh WIP piece of #Archaea #phylogenetics data for a collaborator.

    Those barplot margins are driving me crazy - it's actually throwing off the immediate impression of the data! (pink bars are essentially all 1/2 or less of the orange bars, which is pretty important in context) I really need to buckle down and get to hand-coding my trees from scratch using #rlang or #julialang soon.

    Hmm. How's Julia ecosystem for phylogenetic trees these days?

    #microbiology #bioinformatics

  9. Ok, why do people keep doing this:

    library(tidyverse)
    library(lubridate)

    when the first call automatically loads the package in the second call? Am I missing something here?

    I see this **everywhere**!

    #rlang #rlanguage #tidyverse #lubridate

  10. Finally sat down to try to get my head around `reshape()` after being told somewhere that `melt`/`cast` are old hat, `reshape` is the new hotness...the result?

    Friendship ended with `reshape`, now me and #tidyr are besties, `pivot_longer`/`pivot_wider` ilu :blobcat_hearthug: #rlang #dataviz

  11. Want to use {pak} as backend for {renv} actions? Set the variable RENV_CONFIG_PAK_ENABLED = TRUE github.com/rstudio/renv/issues #renv #pak #reproducibility #RLang

  12. Hello again, R . . .

    R for sure has deficits (but so does python), but for exploratory data analysis, particularly ones heavy in statistics, R can sometimes shine. I still abhore passing variables into functions, but I get why for simple EDA one might want non-standard evaluation.

    R is making a comeback:
    infoworld.com/article/4102696/

    #rlang

  13. Dark times call for desperate measures, and with my career being a little hosed, I'm writing a book! It's about teaching R users to write code like software engineers do, and the hope is that I can use it partially as content marketing for my coaching offerings. Here's the first chapter: #R #R-lang

    R the Software Engineering Way...

  14. Heya R devs - did you know you can run all your favorite GitHub actions on Codeberg?

    Codeberg is rolling out Forgejo actions - an (almost) drop-in replacement for GitHub actions, which means we can (almost) use `r-lib/actions` directly on a free and open source platform!

    Just a couple tweaks are needed, and for your convenience I'm automatically mirroring r-lib/actions and applying those changes so they're ready to use.

    codeberg.org/r-codeberg/r-lib-

  15. @tommytang.bsky.social On #ComputerLanguages for #Bioinformatics There is an era of #Bioinformaticians who learned #R #RLang back when #Python #PythonLang wasn't very good at statistics/plotting. More recently, the trend has shifted towards the latter.

  16. Doing a little geo math in R the other day, and for some reason my computer was really struggling to calculate ~3 million distances between pairs of locations. I figured my intuition was just off, and set it aside.

    Today I took a second look - did it on a small subset and...figured out that the "m" in "distm" is not *meters*, but rather, *matrix*, and I was asking it to calculate the distance between every unique combination of my three million locations, and thus calculating something like 10 *trillion* distances. Oops!

    Let this be a reminder of the value of running things on a subset first to do a little reasonableness check :blob_sweats: #rlang #statistics

  17. I finally took the time to properly document an issue with S7, which prevents multiple packages pkg2, pkg3 from reexporting the same generic from another pkg1: github.com/sebffischer/S7-issue The workaround is to not reexport the generic directly, but a wrapper that calls into this generic. #rstats #rlang

  18. A question for the -in-the-terminal crowd

    Does anyone know of an R package for plotting in the terminal using a terminal graphics protocol (kitty/iterm/sixel)?

    I’ve been toying around with it, but realized I should do some due diligence to make sure it doesn’t already exist before I get too far along.

  19. This is a great news for #rlang - as someone who took the weirdest possible coding education route (python -> julia -> r), some investment in R infrastructure is a promising sign.

    r-consortium.org/posts/soverei