#rlang — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #rlang, aggregated by home.social.
-
Want to use {pak} as backend for {renv} actions? Set the variable RENV_CONFIG_PAK_ENABLED = TRUE https://github.com/rstudio/renv/issues/1210 #renv #pak #reproducibility #RLang
-
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?
-
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. 🙃
-
"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
-
Wait! You can wrap pipelines in R in parentheses to directly use the last value?!?
-
Want to use {pak} as backend for {renv} actions? Set the variable RENV_CONFIG_PAK_ENABLED = TRUE https://github.com/rstudio/renv/issues/1210 #renv #pak #reproducibility #RLang
-
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!
-
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?
-
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**!
-
Want to use {pak} as backend for {renv} actions? Set the variable RENV_CONFIG_PAK_ENABLED = TRUE https://github.com/rstudio/renv/issues/1210 #renv #pak #reproducibility #RLang
-
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:
https://www.infoworld.com/article/4102696/r-language-is-making-a-comeback-tiobe.html -
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... -
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.
-
@etiennebacher Jarl is working as an R linter in #HelixEditor now, thank you! https://jarl.etiennebacher.com/editors#helix #RLang
-
@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.
-
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
-
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: https://github.com/sebffischer/S7-issue The workaround is to not reexport the generic directly, but a wrapper that calls into this generic. #rstats #rlang
-
A question for the #rlang -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.
-
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.