Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

R Weekly Highlights

R Weekly Highlights artwork

Issue 2026-W39 Highlights

Sep 25, 202651 minAudio

Have you found a rogue line of rm(list=ls()) in your R scripts? Then we have a terrific update to a package to find those environment issues and much more. Plus a candid take on the lifecycle of spreadsheet-creating packages, and how to take matters to your "R" hands when faced with a perplexing reviewer comment. Mike and I also share our takeaways from an eventful posit::conf(2026)! Episode Links This week's curator: Colin Fay - @colinfay@fosstodon.org (Mastodon) & @colinfay.bsky.social (Bluesky) & [@_ColinFay]](https://twitter.com/_ColinFay) (X/Twitter) Release: sessioncheck 0.2 Ghosts of spreadsheets past Observed power tells you nothing Entire issue available at rweekly.org/2026-W39 Supplement Resources {sessioncheck} https://sessioncheck.djnavarro.net/ Why Every R Package Wrapping External Tools Needs a sitrep() Function https://drmowinckels.io/blog/2026/sitrep-functions/ Marimo https://docs.marimo.io Supporting the show Use the contact page at https://serve.podhome.fm/custompage/r-weekly-highlights/contact to send us your feedback R-Weekly Highlights on the Podcastindex.org - You can send a boost into the show directly in the Podcast Index. First, top-up with Alby, and then head over to the R-Weekly Highlights podcast entry on the index. A new way to think about value: https://value4value.info Get in touch with us on social media Eric Nantz: @rpodcast@podcastindex.social (Mastodon), @rpodcast.bsky.social (BlueSky) and @theRcast (X/Twitter) Mike Thomas: @mike_thomas@fosstodon.org (Mastodon), @mike-thomas.bsky.social (BlueSky), and @mike_ketchbrook (X/Twitter) Music credits powered by OCRemix A View from the Top (of Shinra HQ) - Final Fantasy VII Remake - TheManPF, Andre Beller, jnWake, Kev Ragone, Michelle Dreyband, newmajoe, Ronin Op F - https://ocremix.org/remix/OCR04777 Hotel Rhumba (I Want to Go Home) - Earthbound - The Pancake Chef - https://ocremix.org/remix/OCR00526

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

Hello friends. We are back with episode 242 of the R Weekly Highlights Podcast. And if you're new to the show, this is the weekly ish podcast where we talk about the excellent highlights and other great content that has been shared at R Weekly, on the R Weekly Newsletter, I should say, which you can find at rweekly.org. My name is Eric Nance, and I'm sorry that we were off last week, but, yours truly was in what I call a conference trifecta last week, and usually when we will record, I was at the third of the three conferences in Washington DC. But I am back, maybe not quite rested yet, but I'm getting my bearings a little bit

and luckily to ease me my way back into this, podcast adventure is my awesome co host Mike Thomas. Mike, how are you doing today? The same, Eric. Just trying to debrief as best I can from posit conf last week, which was fantastic. Not only the content, but also got to see a lot of people, in the data science community that I hadn't seen in a while, and including you getting to see each other in real life, which was was really special. So and we had a couple we were a fully remote company, at my company, and,

there were three of us that got to attend together and spend some time together in real life too. So it was it was cool. Yeah. I, again, I feel it's it's not fair that we only get to see each other in IRL once a year at most, and and we are lucky that now we've done that a a few times now. But yeah, Pozikoff, it was a lot happening at that one and a lot of interesting, you know, announcements, a lot of interesting conversations I've had, of course, with you and your team, as well as others in the

intersection of R and Life Sciences that I frequent quite a bit, but also my other great friends in the community. So we're going to give our recaps of the comps shortly, but of course giving my, huge kudos to everybody that said hi, that were maybe listeners of this show or following us on our various, social channels. It's great to meet all of you and great to see the enthusiasm in the R community has not wavered, at least in my estimation, and both, Mike and I gave, talks,

at the conference, and I dare say they went pretty well. My talk was about this very thing you're listening to, this project about Our Weekly. Got it somehow in five minutes about being yanked off the stage, and luckily, having having you in the audience, Mike, was super awesome, and I get to get to drop my little, Easter egg of catchphrases that those that listen to the show probably would know, oh, yeah. I remember him saying that, but it was it was it was a lot of fun. And, and your talk as well was amazing to see a really innovative partnership

of Shiny and design. It was it was super excellent. But first, let me put it to you, Mike. What was your, POSIT experience like? What were some of your takeaways? No. I couldn't agree more, Eric. You did a great job presenting our weekly project, what it's all about, and a little call to action for some of the folks at POSIT Conf and any of you listening right now to help out on the project if you can. So that was great. I don't know how you managed to squeeze it into five minutes, but kudos to you for doing that. And yeah,

a shout out to my co presenter, Keaton, who made it much easier to present our presentation on the last day of the conference because just kind of only have to sweat half as much when you're doing a co presentation. So I get to enjoy the conference a little bit more than I would have otherwise. It's tricky with those final day presentations. But excellent content. I think there was a little bit of something for everybody at the conference. I know a lot of folks are burned out by AI, but I think there was enough content there that was non AI

that was really interesting to consume as well. So I think it had something for everybody. Regardless of what your interest was, I think there great opportunities to take things away. And the other thing, you know, when we think about, you know, having to talk about AI, god forbid, the POSITConf, you know, I go to a lot of other conferences as well where there's talks about AI, but at positconf, it's tangible. Like, people are building things that actually work and do things with AI, and it's not just, you know, PowerPoint presentations about

how we need to be using it, but we don't necessarily have use cases or, you know, any sort of plan for what we're gonna do with it. So, you know, a lot of new R packages, R package updates around that type of stuff. I'm sure plenty of stuff on the the Python side as well. As rust stuff that, you know, Hadley Wickham was was showing that he's built a couple CLIs and and rust for all sorts of different workflows. So, again, I think there was something for everybody and

hopefully everyone that attended got something out of it. Yeah. I have, I've largely similar thoughts and my my conference experience that actually happened a day beforehand with what we call the Our Pharma Summit where again a lot of life science talk, but a lot of, you know, sharing ideas and yes AI was a part of it, but there was also very much non AI issues that we discussed and it was great to get, you know, shared consensus on the things that we should be concentrating on as a whole, and we got a lot of work to do, but a lot of positive

momentum on that, and yeah, like you, I was, interested to have a balance, so to speak, and I'm happy to say that the session that I was in, the lightning talk session, none of them were focused on AI, which is a a nice breath of fresh air. Just give yourself a break here and there. There is, certainly, some interesting developments in the realm of building AI with trust that, Simon Couch and Sarah Altman had the keynote on the first day of POSITCOMPH about the, Commons Package,

which I am keeping a close eye on, and it's, an interesting space to look at because myself and my colleague, Will Landau, who you well know is the author of the a very important targets package, but also more recently a really innovative guide called trusted mini agents, where we are looking at how to harness these effectively with some guardrails and posit with Commons has a slightly different approach than what Will and I have with this workflow, but we are in close dialogue with them, I think

in general, the genie's out of the bottle, whatever cliche you want to use, AI is going to be leveraged in these enterprises one way or another, and yes, it can be nauseating at times to sift through all the different content, especially some of these other conferences, but I do think there was a healthy enough balance in what Posit was, presenting, that there is still more than enough content and tooling available for the R user, the Python user, without having to dive into this, but then when you do need to dive into it, I think we got some interesting frameworks to pursue. So

lots of interesting conversations across the gamut on that side of things and yeah, I think, in the end, it's my most valued part of the experience is connecting with others and geeking out on all the fun little side projects that we start, maybe we don't finish. Seeing Emile Hundfeld, in his tidy or his shirt that was literally a Hex logo shirt that he wore in his presentation. I'm like,

I need that shirt. Are you selling this shirt? And he said he's only made one so far. So if he ever makes another copy of that shirt, I am first in line to get that because that would be a great addition to my wardrobe. But just little things like that, you see at Posikoff and you never take it for granted. So, yeah, all those conversations were amazing. I will admit I was slightly disappointed by the 80s night because I was expecting real arcade games so I could show my medal at the the classic, you know, fighters or the other games, but it was just these more, I don't know, other games. But nonetheless, it was a good time to rock out with some eighties music too. And I had I had my Tron shirt ready to go, and there were a few people who were like, yeah, baby. That's an eighties theme right there.

Yeah. The band was good. The AI generated eighties ified headshots of the speakers were good, but tough. Tough. The the tough look. Yeah. Yeah. I I did I would not have, made it in the eighties. Let's put it that way. I gave them clear instructions of what to do for mine, they didn't listen, and I got some of those radically different, but, you know, everybody had a good laugh at my expense, like they always do anyway, so. Yeah.

Whirlwind of a week, and I'm sure the recordings will be out hopefully soon thereafter and you can watch Mike's and I's talks when they're released online, but again, to have that experience and now for at least my next prep of conference work, it'll be the Our Pharma Virtual Event and we got a lot going on for that, but yeah, the year's almost over. So, yep, enough of my, blabbering here, let's let's get on to the the issue at hand here. This is, the issue curated by this week by the esteemed Colin Faye,

and as always, I find every opportunity to plug Gohlm in a lot of my Shining related talks and tutorials internally and externally, it's still doing wonders for me. And as always, Colin himself had tremendous help from our fellow RWiki team members and contributors like all of you around the world with your poll requests and offer great suggestions. You may remember Mike, I think it was at our studio conf years and years ago, You remember Jenny Brian's talk by chance?

Which one? Which one, I should say. It had the one where she was gonna commit perhaps a crime on somebody if they had a certain line of code at the beginning of their R scripts. Oh, of course. You know this one. The infamous RM list equal LS. I used to do that. I'm not going to throw any shade at anybody that's done that before, we've all been there. Well, that's always just like one potential issue that can occur if you're trying to make a script reproducible,

and you may do other things with file paths, you may do other things that are kind of like your workflow specific, but if you have to send this off to somebody, whether it's an external collaborator or a highly important regulator, you gotta watch for this stuff. And I'm happy to say that our first highlight is an update to a package that admittedly flew under the radar until I saw this highlight here. And this package is called Session Check version 0.2

release, and this highlight is the blog post, which is kind of the digest of the package and the release notes, and it comes from the author of the package, Danielle Navarro, who has been around the NDR community for many years. You may know her from her amazing work in the generative art space with R, and apparently now she's actually a part of a life sciences type of role in pharmacokinetics or pharmacometrics. So welcome Danielle to the wonderful and wacky world of life science. I'm sure you're learning a lot here.

But yeah, this blog post is indeed talking about the session check package itself and she has actually announced this idea of it last year, but what this package does under the tin is that literally the main function of this that you'll probably use day to day is the session check function, and what this will do is it's gonna run through a few basic checks, not it's kind of similar to running like tests of sorts, if you want to say that,

but you will get some, very clear warnings if your R environment combined with your R scripts are doing some things that may hamper the idea of reproducibility and running this code successfully. You may have some unexpected objects in your environment that maybe were left over. You're not really using them anymore. You may actually not have packages attached that you claimed you were going to attach

and, or it may also look at if you're doing some wacky thing with environments and it may, you know, call out if you have some environment in there too. And you can make it so that if this function has any of these warnings, you can throw an error on the spot so that everything below it will not run. That is an option available with the action argument in the session check function. And that is kind of what got it ran it on CRAN as it was, that function alone.

But there are some new, goodies in version o dot two that I think will be really helpful, especially in the case of debugging and trying to narrow down how these issues are happening, and that is a new function called session state. And the very, you know, very helpful part of session state is that this can help you, in essence, acquire the different failures that have occurred in in your check the session tools

and get some very verbose output, not too dissimilar to what you might see in a session info call with Viva DevTools or in BaseR, where you get all the details on the R version you're using, the OS, the locale, more about the machine itself, what's your current working directory, what is, if git's involved? What's the latest commit you're running on in the repository? Your library paths, because, oh yeah, there can be trouble if you do custom library paths,

as well as even notes about the random number generator state under the hood, along with what's in your global environment, the packages you've attached, and the other environments that are attached. So yes, you may be looking at this and be like, that does look kind of like session info, right? Well, it does have a little bit of differences, again, being very clear about the working directory that's used, being clear about what are the other attached environments and not just

one about the global environment and other things. The GET state, again, these are all things that may be in most usage you don't have to worry about, but again, if you're going to hand this code off to somebody, it can absolutely be important. So I know from experience the environment I'm going to run my code on in my day job is a Linux based environment, that's typically not the same as the environments in the health authorities. So, if session info or session check, I should say,

can be utilized across both sides of this, on the industry side and the health authority side, we might see more concretely where these differences are residing, and I think session check could be a really important point of this. And last but not least, there is a way that if you have this session state output and you maybe see some things that you don't necessarily want to get disclosed, you can add some special parameters to redact certain things

in case that might be confidential. So there are ways that, for example, if you don't want to say clearly what machine this is running on, you can feed it like an empty character vector in a custom print call with session check as part of that print call in case you just want to subset this output to remove certain things. So this is a very interesting take on the realm of diagnostics, the realm of,

hey, you got some things to shore up before that code can run, and hopefully be more transparent on what's actually happening under the hood. So I will keep a close eye on this because I think this is a valuable toolbox in the realm of reproducibility in your statistical environments. I am absolutely a fan of anything that helps make code more reproducible. Eric, you know that we love reproducible data science. On this podcast, sometimes I feel like I'm a better reproducible data scientist than I am a data scientist data scientist.

My statistics, you know, have have waned as my software engineering best practices have have ramped up, but can't have it all. We we try our best. One cool thing about session check is that literally has no hard package dependencies at all. This is pure base R. Just a few suggests packages. And I would imagine how this might get used in practice. I think there's a bunch of different ways that you could incorporate this into your workflow. But perhaps it this might get run at, like, the beginning of a session of someone else who's potentially trying to reproduce and audit your work to make sure that they don't have, you know, anything else that would be affecting the code that they're about to run.

This reminds me of the sitrep idea or situation report Oh, yes. Idea by Anathasia Moinkles on one of her blog posts, which I think was kind of along the lines of, you know, wrapping APIs, but also introducing functionality that if somebody hit an error, you could also spit out what, you know, she referred to as a situation report of maybe different environment variables that have been set,

you know, and and other things that may be affecting the, you know, error or the sort of state of the user's last call. So, you know, I'm a big fan of anything that sort of makes the user's environment more transparent so that when you are working collaboratively with someone else and you run into an issue where it's working on my machine and not working on their machine, you have more transparent pathways to be able to debug that together. And some of this is made obvious that hopefully remediates,

and expedites that debugging process, you know, 90% of the time or something like that. So, very cool to see this new package out there, in the ecosystem and, definitely one that I would love to try for some of our more high stakes, software handoffs. Yeah. And there's a lot of great information in the Packer's site as well, which we'll link to in the show notes as always. Danielle has done a wonderful job with the vignettes that dive into deeper details of what you can do with these various outputs,

such as getting back to that session state, what's a good way to kind of compare two different, you know, runs of that and seeing what is actually modified. So there's some interesting ways you can customize the output, customize the ways you compare that information. So I would definitely invite you to check out the docs and, you know, I'm not going to pretend that this kind of stuff is a glamorous topic in today's world, but I can speak from experience,

some of these kind of details that many in the world of data science take for granted, they can absolutely wreak havoc if you're trying to advocate for the use of R, the use of open source in general, these new philosophies in the face of proprietary languages that simply have, like, one installer and that's it. It has three letters, you can guess what I mean. But we need ways to make this environment issue a non issue going forward. Will we get there 100% of the way? No, we won't. It's impossible.

But diagnostics, better information, it's never a bad thing. I've always on the side of being more transparent, knowing where differences are, knowing where gaps are, than just hoping for the best so you throw it over the fence and that collaborator or very important reviewer is just going to be able to run it on one shot. Spoiler alert, they're probably not. So anything we can do to help with that, I think, is a huge win in this book.

And up next in our highlights, yet another topic that, you know, in the course of data science has always been unavoidable, and it is the use of producing or consuming what can be sometimes messy or highly complicated spreadsheets. Yes, we've been there, we know that, and there are times to that we need to not only consume these, but sometimes we need to output to these to meet where the where the users are sometimes,

depending on what industry you look at, and there are lots of different ways to tackle this, especially in your specific domains, and sometimes things go, you know, pretty well, and sometimes you have to take a turn somewhere and, you know, try different approaches. So our next highlight is showing some of the adventures in producing a couple of packages in this space to help with, spreadsheet consumption in the public sector. And this post is affectionately entitled

Ghosts of Spreadsheets Past, and it is authored by Matt Drey, who has been featured in the highlights before. He is a data scientist working in the public sector in The UK, and he is blogging in this highlight about his experience in creating not one, but two packages to try and help with, you know, robust spreadsheet generation. So way back, we may have even had a highlight about this, he had wrote an R package called

I always don't know how to pronounce this. Well, is it a one one y or a alley? I I don't know. Ally maybe, but with ones instead of l's. Yeah. We'll call it Ally. Let's make it simple. It's Friday. So he has made a package called Ally Tables, which was able to help his work with the UK government, generate publication ready spreadsheets. So in other words, really not just the content, but the formatting around it and ready for disclosure in their various pipelines.

And that was making sure that any strict requirements for formatting and such were addressed at the package level and that the user could just generate the content and be on with their day. And that had had a lot of utility to it, but that has since been transferred over to the, Office of National Statistics, Best Practice and Impact Team, which they have now renamed the package, but it's sitting in good hands. But as he was, you know, iterating on that, he thought of a different approach that might

kind of get you somewhat the way there, but in a different way, where you might want to build layer by layer what goes into the content of this new spreadsheet you're producing, and that is basically leveraging that idea with the use of a configuration file to help spell out a lot of these details. Does that sound familiar? Yeah. A lot of the packages I like to use indeed make a YAML type of config file a first class citizen,

such as what we shouted out at the outset. The Golem package makes great use of a config file to define different profiles of sorts that your Shiny app is going run-in. Well, Matt wanted to take a similar idea with this, building of spreadsheets, but starting with a nice robust specification, and that's where he had built the Ally tables two package along with, a YAML Sheets, package as well. But guess what? They're actually now archived, which I did not read until when I was first reading the highlights.

But he stands by the, principles of what this was governed on that, you know, it could be interesting, an interesting, you know, workflow of this, But again, another reason he wanted to embark on this journey, he wanted to stand on the shoulders of a more upstream source that was robust in creating Excel outputs and that is the OpenXLSX2 package, which if you used OpenXLSX before,

was my first, you know, way to get out of producing and consuming Excel files in R without Java because OpenXLSX was produced in C plus plus at the back end. I believe OpenXLSX2 is also based in C plus plus so you don't have that dependency overhead of, I forget the name of the one that had Java in it, but it was not fun one way or another. Installing those JAR files, get that out of here. It was terrible.

Absolutely terrible. Yes. You never want to put yourself in that situation because it's one thing to get it working on your machine, but then when you have to actually, say, teach a workshop with a bunch of R users and, and they can't get, you know, JAR installed, it is very much an epic failure. Just get that out of here. Anyway,

diversion over. So the idea on top of standing on the shoulders open XLS two is that, again, being able to build the different components of the spreadsheet one by one with these kind of layering functions on top of that and to, again, with this flexibility that he coined the blueprint, that then you can just kind of add some other metadata to that and let the YAML spec take care of that heavy lifting.

So they were really, as an example here, what the YAML could look like, it's a very basic YAML structure, giving it like the sheet title, the different tables inside of it with the table and the expression to read that contents of the data into R, wherever you run an R function. Very familiar if you've done anything with the config package itself or Golem to run custom expressions inside that YAML construct.

So that again is a very nice approach to this, but, you know, as he said, they're archived now, they were good for learning, but hey, they're still out there if you want to try it out. But, he concludes the post by saying, yeah, he doesn't want to think about spreadsheets anymore. I understand, Matt. I understand. There are a lot of things I don't want to think about anymore that I did early on in my R journey, like I said, the Java experience amongst a few other dead ends I've had. But what you've done well,

you've shared it with the world, what you learned, and we're all better for it. So thank you, Matt, for sharing your candid take on the spreadsheet authoring journey. You know, one of my other favorite podcasts to listen to, or podcast hosts, I should say, is a guy in the data science space named Hugo Boun Anderson. He was originally in the biology, I think, life sciences field. And he's now in data science and AI more generally. And he always talks about the fact that no one ever publishes, especially in the sciences,

the things that didn't work. Everybody just always publishes the things that did work, and sometimes it's more valuable to publish the things that didn't work. Not saying that either of these packages didn't work, but I think for Matt's purposes, didn't exactly pan out the way that he initially hoped that they would would pan out. But that being said, this blog post and the content of those packages and what they were trying to accomplish and where Matt hit walls in the process, I think, is really, really insightful.

I think concept of trying to be more programmatic about how we work with spreadsheets is something that extends to us in every industry, people in every industry, right? Spreadsheets are unfortunately everywhere for better or for worse. And a lot of times as data scientists, we have to accommodate spreadsheet users with packages like, you know, open XLSX and read Excel and and things like that and

we can get into maybe I won't speak for everybody. I have gotten into some crazy workflows to just try to stitch together an Excel workbook for somebody and do formatting and put things in particular places. And it's at the end of the day, it's like, hey. Just learn. Just learn a little bit of r. Learn to program. It'll make your life way easier than what you're trying to do right now in Excel and a lot of times, it feels like over engineering and and overkill. So, utilities like this that would potentially make it simpler, you know, this sort of YAML to

Excel translation with, as you mentioned, some of these inline expressions that can evaluate things, you know, based upon a YAML definition. Very, very interesting and I'm sure very, very helpful from an automation perspective. But this is, I think, just one of those spaces where it'll never be a perfectly solved science. I don't think, just because there's too many hard edges in this problem space but again, I, you know, I really appreciate

Matt putting this blog post together and walking us through sort of the history of these different packages that that he had worked on and where some of them stand today and and what they're able to do and what some of the shortcomings are because again, I think this is a space that so many of us have played in, struggled with, and regardless of what industry you're in. You know, I think about what a future state will look like. Is there a way to kind of have the best of both worlds, a spreadsheet like interface in front of a much more robust,

much more well documented format? I think we're getting kind of close. Maybe you're not quite there yet. You and I, Mike, are huge fans of the Parquet format, aren't we? It is hugely powerful in the realm of interoperability and data science languages. Even the proprietary ones are starting to use it, albeit in a very weird way. Let's save that topic for another day. Imagine if we could have some kind of interface that kind of gives you an Excel like experience, but instead of loading Excel files,

loads Parquet files. That would give me a lot of joy as my friend Stimpy would say. Oh, joy. I mean, maybe someday it'll get there, but, I'm I maybe maybe Matt can make a package that does that too in his spare time. Who knows? But that would be fun. That would be really cool. And I I think there's a lot of promise sort of in the notebook space around that potentially of, you know, trying interactive data analysis and exploration easier for non code folks.

On the Python side of the world, I know this is our weekly, so apologies. But I am a big fan of a project out there called Marimo, and that is sort of a modern notebook take. I do believe there's integration with Quarto. If you are looking to leverage Quarto with kind of Marimo as the back end, I'll have to double check on that but it, I think, takes a lot of the things that were short comings in traditional notebook, Jupyter notebook, whatever it may be, and smooths those out.

It creates a DAG behind the scenes. So if you actually update one variable in one place, it will update it in all the other places that it is used in your code regardless of whether the code chunks regardless of the order of the code chunks, which is pretty cool. And it it'll flag something that you you've sort of written out of order because that is, you know, one place where I think a lot of notebook users got stuck. But it also, I think, has great agentic capabilities,

if you will, where you can kind of develop the notebook and work through your data analysis with an agent kind of at your side, which I know there's probably a lot of non coding folks out there that are trying to work with the LLM agents of their choice to do data e things. And, I think sort of having some sort of notebook environment to be able to do that in a more structured way could go a long ways towards bridging this gap, I think, that we're talking about between data science and spreadsheets.

Yeah. I'll have to check that out if anything to give ideas. Right? Because I know one of the the biggest cons we've seen about adopting Parquet in general is that you can't just double click a file and open it. But, you know, at some point, we'll have tooling that can make that possible. One can dream anyway.

And rounding out our highlights today, especially those of you in the research area, you've probably made some, you know, very novel analysis or documenting an experiment, getting that publication out there to share with the rest of the world. Well, it's never just a simple hand it over the fence. Oftentimes you will get comments back, whether you're doing something internally or you're sending this out to a manuscript or a journal out there. And sometimes the comments you get back are very insightful, you know, they're good ideas for revisions and, you know, the authors, you know, meet together and update it. And sometimes you get a question that kind of makes your head scratch a little bit, and you

may wish they had phrased it a bit differently because they just might have a bit of a misunderstanding. Well, this last highlight here is a very interesting showcase on the statistical side of what happens when you get one of those comments about how you as the author can take matters in your own hands and really prove out maybe some of the lack of robustness in that question that maybe could be framed a bit differently. And so this last highlight comes to us from the Tidy Ecology Blog, and I admit, I tried my best to figure out who authored this, but I can't really seem to find the team behind this. Yeah, Me

we both our diligence. If I find it before publishing, I will put that in the notes, but nonetheless, they got a lot of content on here, and it's very interesting for those in the role of ecology and leveraging art. There's a lot of good content available here, but the post is entitled, observed power tells you nothing. Pretty, bold title here, but what does what does that really mean? So let's first set the context. This imagine this paper was summarizing the result of an experiment, a study

where a given, you know, maybe there was a treatment arm and a placebo or control arm, you know, compared, and the effect between them was deemed non significant. So, great. Well, the referee comes back and asks, well, the treatment differences are not significant, but can you report the power of your test? And so the author does just that and reports something like, Oh, point one nine, for example.

And the referee thinks then that, oh, yeah, that means your study was too small. Not quite as it seems, folks, and now we're going get a little statistical kind of knowledge check here, is that in this situation, in the context that this was asked, when you are computing the power, which is kind of your ability to detect the true effect while not minimizing the chance of detecting the non effect or erroneously

including the noneffect, that the effect you get that you actually observed is simply a swapping of how that p value that you calculated and you already reported is actually generated, and you're really not getting anything new out of that kind of rearranging of sorts of that calculation. So instead of just hype hypothesizing this, why not use R to investigate this? So the first part of the post

has a handy little, function that we have ggplot2 doing a simple, analysis looking at how much, how many, simulating like a large number of these kind of two sample comparisons, different true sub effect sizes, and that, you know, we can compare these side by side, and then maybe looking at some correlation, some association between the p value and the power.

And so this was replicated about 1,200 times for the number of simulations, and you would not believe the correlation coefficient that was done with this using the Spearman coefficient between the p value and the power exactly minus one. You will never see this in the real world unless this literally is the case of a very strong, in this case, inverse relationship

between the power and the p value because you're baking it on that observed effect. It is literally one in the same. So that could be, you know, a little bit of, you know, knowledge gap in that referee, you know, however well intended they meant to be, but in essence there's some nice visuals here about what happens with the p value and the observed power that you can see with that if you want to look at the different, you know, effect sizes and how that maps out.

And, you know, there's some other interesting metrics here that you can summarize with the different ranges of, say, sample sizes and looking at the power, in this case, when you have a p value of, like, exactly point zero five, which is usually the benchmark we cut off, for concluding if a study is significant or not, that power is very often 50%, literally like a flip of a coin at that point, which again, as a statistician,

if you have statistic courses, that is literally, you know, very fundamental to why that happens, but this is just using more results to kind of show this. But, you know, that may have been just a referee just not understanding this correctly. What perhaps if we put it in their shoes with the advice that we're seeing in this post, what is the more robust question that could have been asked that would not have been subjected to this kind of phenomenon that, again, shows that literally

perfect negative correlation. Well, the better question might have been, given this nonsignificant result that we saw in this study, does it rule out the effects that are large enough to actually matter here, or is it just uninformative in one way or another? So the takeaway is that relying on the observed power is not the right answer to this, and that you can see in some nice visuals

that we see here that when we have, you know, a little bit of variation inside versus a different sample sizes per group, you do see that when you have a higher sample size, yeah, the variation is going to be tightened a bit in this differences between the groups, but it's still not conclusive yet. So what what can you take away from this? It is a very interesting take on how if you get a question that seems a little odd on the surface,

run this in R, try some things, try some simulation studies to see if you can prove out maybe your hypothesis of the statistical theory that you think could be leading to the actual answer here. And this was, again, by the author's acknowledgment, a very clean example of a two sample t test where the underlying algebra behind this is very straightforward to digest, straightforward to utilize. This will be obviously more complicated if you get to different types of methodologies for

generating these comparisons. But again, some great example code here if you want to investigate this yourself. We have a similar inference method in that, you know, behind that question, sometimes there's more than meets the eye, and sometimes a little reframing can do everybody a lot of good. So really insightful, post here, especially when you get sometimes some wacky questions from that referee. Yeah. No. I I couldn't agree more. I think this concept of power analysis

is one that I've heard a lot of in, like, AB testing for SaaS companies trying to decide if a button should be blue or if it should be yellow for, you know, the conversion rates that they'll get. And, you know, doing those AB testing and hypothesis testing, I think what we were talking about in this blog post was sort of this post hoc, you know, power calculation and that is the the thing that is going to have this one to one relationship with the P value which sort of makes it not worthwhile to do but

I think if you conduct like a prospective power calculation and if you do that actually before you go through the data collection process or or running that experiment that you are looking to, test, that can tell you sort of how much data you will need to collect or how long you need to run your experiment for in order to have a sample size large enough to have a significant p value or p value less than know, point zero five. That's sort of what you're you're gunning for there. So, that's I think one way where a power calculation can be helpful but certainly,

the math is showing us here that, you know, a post hoc power calculation really isn't helpful at all and one of my favorite things to do when learning statistics is to do exactly what this blog post does and run some simulations, generate some data, running through that mathematical process and that underlying formula behind what you're trying to understand and plot it out and show that relationship right in front of your eyes with data. One thing that helped me understand

statistical distributions was all of these little R functions and base R that we have, like R norm and P norm and for generating a random sample of data that fits that distribution. And helped make all of these different statistical concepts click for me so much more than just staring at formulas in a textbook. So, if you take something out of this blog post as maybe someone earlier on in your, stats journey, I would highly recommend sort of going through the thought process and the workflow that goes on in this blog post to actually generate some data, run some simulations

to try to help wrap your head around the concept that you're trying to learn. Yeah, and when you're looking at these more fundamental, you know, in the realm of statistics, especially a thing like the t test, a frequentist type of approach, it can be very easy to compute these investigations. When you get to the Bayesian side, yeah, you will have to probably invest in a little more horsepower if you're going to run through a bunch of convergences and whatnot, but you have a lot available to you to investigate this. And

this is where me growing up when I did, me learning R and statistics when I did, boy, you all out there that are earlier in your journey, not to be that guy on his porch staring at the lawn, You have a lot of things available to you that yours truly did not have in those early days. So take advantage of it. There is a wealth of material out there to have, you know, the practical ways to level up your statistical knowledge. It's not locked in textbooks anymore. It is all available to you and there's lots of great resources out there to level up, including our weekly itself. Not

to brag here, but we do have this great roundup of cases like this where you're investigating something statistically or just showcasing how a method is used in practical data science. That is some of the bread and butter of what our weekly is all about. And as usual, this issue has a lot more than we could talk about here, but the one thing I will plug that we don't talk about enough, and this actually came up in a meeting earlier today with, members of my extended team, and I was sharing with them some of my adventures in the world of the R community,

and a very, you know, talented colleague asked me, well, if someone's kind of new to getting engaged with some of these collaborations, where should I start? Of course, I kind of said, Our Weekly is a good place to start, but not just Our Weekly itself. You will see in Our Weekly, towards the bottom, our section on the community, where you can get involved or connect, is what the actual heading is. And that, the community unplugging, is the Data Science Learning Community run by John Harman.

It is a valuable group to be a part of, and we don't talk about enough. I talk with John extensively at Posikoff. He's one of the good ones, as they say, in this community or keeping this project going through years and years, even when it was called R for Data Science before this. But if you're new to your journey and want to learn what others are doing or need help with various things, the Data Science Learning Community, you could do a lot worse than to become a part of that. So I think that is a very valuable resource for people.

God bless, you know, John and the data science learning community, Slack folks that administrate that for dealing with a lot of the spam that has unfortunately come in in the last last couple years. They do an awesome job. If you're, I'm in a lot of other Slack communities where there's a lot more of that. So they do it to keep, you know, really great relevant content in front of us. Yeah. And that's where, again, just like their community and data science learning and with the R weekly community, humans are trying our best to curate this content,

strip out the noise, and give you exactly what you need on your learning journey. And it's not easy, folks. That's why as far as the take home message of my talk, we would love your help in this project. What's one way you can help is to contribute to the project. Send that poll request, which, by the way, Mike, you had a really great idea of how we can make that easier. I have not forgotten about that. I just needed time to crunch through that. But as of now, if you want to share some content to R Weekly, we are just a pull request away

on GitHub. The link is in the upper right corner at rweekly.org. If you can set up a GitHub account and you can write Markdown, you can send that great resource to us. And as well as we are a humble team of curators, there are eight of us right now, but we could always use more, and we are a very welcoming bunch. I have learned so much from my fellow curators. You can be part of that as well. You'll find all the information at rweekly.org if you want to get involved with that. But, of course, we love hearing from you on our various social channels as well. I've gotten a lot of nice kudos about the Deposit Conf Talk amongst my other adventures

and where you can find me, you can find me on Blue Sky, where I'm at rpodcastbsky.social. I'm also on Mastodon at our podcast at podcastindex.social and I'm on LinkedIn, so search my name, you'll find me there and sometimes you'll find out where else I'm causing trouble with there too. Mike, where can the listeners find you? You can find me on blue sky at mike Thomas dot b s k y dot social, and you can find me on LinkedIn if you search catch Brooke Analytics, k e t c h b r o o k. You can see what I'm up to.

Yes. And, I admit I am delinquent on my what seems to be a very common thing of after a really important and fun conference to do, like, your write up. You did a terrific write up on your LinkedIn thing, and I'm I'm not I'm not up to date yet, so I need to do my write up. But you had a terrific roundup of your experience there along with some great pictures that made me jealous of your home cooking, I should say, that you had one of those That must have been delicious, man. Thank you. We had a lot of fun. Yep. Yep. But, yeah, certainly those out there that we said hi to, we hope you had a great conference experience, and we love connecting with you wherever you are. So with that, we're gonna close-up shop on this, episode of our weekly highlights. We thank you so much for joining us,

and we'll be back with another episode of our weekly highlights next week.

Open the transcript file

Hosts and Guests

Hosts

  • Eric Nantz Host Feed-stated
  • Mike Thomas Host Feed-stated

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Issue 2026-W47 Highlights

    Nov 20, 202648 minAudio

    Our takes on the increasing removal of friction in good and not-so-good ways thanks to AI, a visual tour of hot air balloon accident data, and a case study of novel image recognition with the rplatipus package. Episode...

    Credit the people on this episode

  2. Issue 2026-W46 Highlights

    Nov 13, 202633 minAudio

    The flow of both data and analytical jobs just got smoother with mizu, opening the door for multiple agent harnesses in Positron, and an optimal statistical model tailored to complex experimental designs with a friendly...

    Credit the people on this episode

  3. Issue 2026-W45 Highlights

    Nov 6, 202644 minAudio

    What happens when that online data set isn't so easy to download anymore? We learn of two packages to ease the pain of obtaining these files and then some. Plus a visit to the visualization corner with a handy way to...

    Credit the people on this episode

  4. Issue 2026-W44 Highlights

    Oct 30, 202631 minAudio

    The celebration of rOpenSci's 15-year anniversary continues with the community sharing their perspectives, and a fun Shiny app that could be quite useful during celebrations on a weekend or the holidays. If you ever...

    Credit the people on this episode

  5. Issue 2026-W43 Highlights

    Oct 23, 202659 minAudio

    We learn about the variety of ways you can contribute back to the core of R, a roundup of the excellent choices available for package and environment reproducibility, and an amazing collection of Shiny applications and...

    Credit the people on this episode