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-W30 Highlights

Jul 24, 202646 minAudio
ShareXLinkedInFacebookWhatsAppEmail

The first wave of 2026 R Consortium technical grants has arrived, how the new ggchord2 can round out your next process visualizations, and a clever take on supplementing your prompts with R objects. Episode Links This week's curator: Eric Nantz: @rpodcast@podcastindex.social (Mastodon) & @rpodcast.bsky.social (BlueSky) & @theRcast (X/Twitter) R Consortium Awards First Round of 2026 Technical Grants Chord diagrams in R with ggchord2 R Blackmagic for LLM Prompting Entire issue available at rweekly.org/2026-W30 Supplement Resources igvShiny demo app https://gladkia-igvshiny-demo.share.connect.posit.cloud/ ggchord2: Chord diagrams with ggplot2 https://nrennie.gitlab.io/ggchord2/ Generic Functions: The Underrated R Technique Fixing Your Worst Problems https://www.youtube.com/watch?v=p00um9ezh74 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 The Unnamed Frontier - Metroid II: Return of Samus - Pyro Paper Planes, Viking Guitar - https://ocremix.org/remix/OCR02892 Super Buck II - Super Mario Brothers 2 - Estradasphere - https://ocremix.org/remix/OCR00577

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 of episode two thirty five of the Our Weekly Highlights Podcast. This is the weekly ish podcast where we talk about the terrific highlights and additional resources that have been shared on this week's issue of R Weekly and that is available at rweekly.org. My name is Eric Nance, I'm delighted that you join us from RevvR around the world. Yes July is almost over, I'm not ready for it. We got, I know for me personally, I got conferences about to happen in September, so I got a lot of prep work for that. Thankfully, this is in my wheelhouse though. I always love doing the podcast here to talk to you all about the awesome innovations in the art community,

But I don't do this alone, so fresh from his recent business travel is my awesome co host Mike Thomas. Mike, how are you doing this Friday? Doing well, definitely racking up a few frequent flyer miles lately and more to come in August and September as you mentioned. We're heading into conference season, but all is well. Looking forward to seeing some people. Me too, yeah. I'm seeing a lot of familiar faces, starting to get the excitement for Posikov and everything, you know, before and after that. So yes, I will be there, you will be there, lots of stuff we'll be talking about there. But we're going to talk about our weekly today

and for that, as always, if you're new to how this process works, we have a curator that rotates in every week to workload so to speak, but also assembling all your wonderful resources. And let's check notes because admittedly this one went down to the wire a bit because it actually happened to be yours truly. That was me this time. On the other side of the screen, it all looks so easy. Most of the time it is pretty easy,

except when I forgot that there was a rotating slot that I forgot to write down on my calendar. Thank goodness. I'll shout them out right now. John Carroll kept me honest and wondering, Hey, are we gonna have an issue this week, Eric? And I'm like, Yes, we are. Whoops. Yep. Happens to the best of us. That was a Saturday night scramble, but I got the poll out there and yeah, we're having fun issues. So sometimes it doesn't go quite as planned, but hey, we're here now and, you know, it's the joys of open source, right? No matter if you're building a sophisticated package or you're just, you know, doing this for the benefit of the community,

life happens sometimes and I wish I had a way to manage myself better. That's another story for a whole another episode, but we're here and as always, whenever we have a curator, you know, attend to these issues, we always get tremendous help from our fellow RWQAY team members like John especially and fellow contributors like all of you around the world with your poll requests and other wonderful suggestions. So let's dive right into it and along with being kind of that conference season happening, you know, in the coming months,

there is an annual, event, especially those leveraging R in the enterprise are very keen to take a look at, and that is the annual, for in this case the first round, of the technical grants that have been granted by the Consortium. So if you're not familiar with how this process works, the R consortium of course is a collection of industry companies that are very dependent on making sure that the ecosystem around R is alive and well and putting you know targeted funding

to various projects, you know, technical projects that are keeping the community going, whether that's what Bayesar itself or, as we all well know, the vast community of packages which certain industries will very much depend on. So these grants have actually been happening now for ten years as of this year. The first grant was in 2016, so now yes we are in 2026. So in the blog post there were six

projects that were highlighted here as receiving the grants. We'll go through a few of them that caught our eyes here, but as always we have the link to the full blog post in the show notes for this episode. So the top of the list that I do see a lot of interesting analyses around and some great infrastructure around is the use of R to analyze census data. And this project right off the bat is being led by Kyle Walker, who has made tremendous contributions

to the R community for having very targeted and elegant interfaces to analyze census data in a tidy way. In particular, he is the maintainer of the Tigris package as well as the Tidy Census package. I see these cited a lot whenever I see blog posts about analyzing the population here in The United States with census data. So these are core pieces

and this grant, which has been awarded $7,000, will help modernize a lot of the internals of these packages, improving the tests and getting into the backlog of issues that have been present out there and dealing with the fact that sometimes, like a lot of these services or packages that depend on services, they depend on apis so what happens when that upstream api from the from the census servers

goes down well you got to be resilient to that so apparently there's going to be some development to make them more resilient to potential failures on that. So that is excellent to see and the other one that I see, you know cited a lot in the blogs and other community sharing is spatial network analysis looking at you know how especially with maps and the like and this next grant is being led by Lucas van der Meer and

in particular this is going to work on a new release, a very monumental release of the SF Networks package, getting it to version 1.0, bringing a lot of stability and a lot of additional enhancements. And this was actually, given around the funding in a previous grant back in 2019, to get it kind of the initial state ready to go. But now this is about refinement here, aligning with you know what's happened with dependency changes

addressing various community feedback for features and fixing bugs and improving performance when you got a very large geospatial network. So there is, a lot of interesting speaking on HPC side, a lot of developments in the spatial community with leveraging the best in class for high performance. One in particular is the interaction with DuckDB and the DuckSpatial utility. I think that will be very interesting to see how SF Networks can tap into that. And then the last one that I thought was quite interesting

is improving a new R package called Weed R for reproducible analysis and R for advancing weed science. I have to be you know careful here what weed are we talking about here we're talking about the type of weed in your lawn that you want no part of when you're maintaining other parts of your lawn not that other kind but I digress so this is an interesting field that admittedly

is a pretty big field in the world of agricultural analysis. So this grant is being led by Doctor. M. D. Asuszuman, I probably didn't get that right, but I got close, and this is looking at how can R bring, you know, much needed reproducible analysis techniques to, you know, this field which admittedly I think is learning its way with this kind of work. I've seen some research manuscripts around it, it looks quite interesting,

and this is being targeted primarily to Bangladesh and their agricultural weed science, but he notes that in the summary here that all the outputs that are being generated as part of these pipelines will be freely available where other scientists across the globe and weed research can tap into that. So a lot of interesting stuff here that only scratches the surface. So Mike, what did you see that caught your eye in these grants that have been granted here? You know, I was chuckling in the background of the weed our package, but we do a lot of work in the agricultural space. And unfortunately, at least here in The US,

there's sort of less and less farming that's that's going on. So, the farms that still exist need to essentially do more with less. So, the idea that we can use, you know, data science tools like this package to improve crop outputs, crop health, things like that, are are really powerful. So, I'm really excited to see that, you know, the Arc Consortium is is giving grants in this space as well. One that's probably over my head is a grant to Travers Ching, who's an independent,

developer, on universal alt rep interoperability for strings. It sounds like there was an existing, maybe proof of concept package called string fish, And R has it it was aimed to kind of improve the way that R has always sort of under the the hood handled alt rep strings across, you know, different package boundaries. And it seems like, you know, maybe in the past, there has been a fair amount of friction there and some things that can certainly be improved upon to make a fit string handling more efficient

and more broadly available across our workflows that involve large amounts of text, logs, genomic sequence data. But I think, you know, when I think about the world of AI nowadays and large corpuses of text that we need to operate on often, I think this can, you know, certainly play into ours ability to be more efficient and work well with those workflows. Another one that I saw out there was in the shiny ecosystem. I believe that

our our Gladkey, I apologize. I'm definitely butchering that name but he's the author and maintainer of the IGV Shiny and IGVR packages. Also, independent. I'll skip the website at gladkey.pl. And he's planning on modernizing and extending the IGV Shiny package, which is in the bioconductor ecosystem. It embeds the integrative genomics viewer as an HTML widget in our shiny. Is there anything that we can't do with HTML widgets? I don't think we've run into anything yet. Not yet, buddy. Not yet. If

you believe. So Yes. I'm sure that's very exciting for the folks in that sort of life sciences, genomics space to be able to bring more visualization based tooling to them those are the things that really help communicate the hard work that we do to the folks that maybe higher up make sort of the decisions that impact the world. So, some really exciting things in this list. It's it's great to see that the R Consortium sort of grant process is is alive and well and backing

so many really interesting and impactful projects. Yeah and I definitely appreciate the diverse set of packages here. You know as me coming from life sciences sometimes you might if you especially listened to this show and some of the other things I'm part of, you might think life sciences is trying to dominate a lot of the R side of things. No, that's definitely not the case. We are beneficiary just like all these other wonderful, you know, endeavors in these other industries that are just as important as anything else. The fact that, you know, we have this diverse set going all the way from that aforementioned

weed science research, census data infrastructure, string processing, lots of lots of interesting, you know, things to follow here. And also keep an eye out for later on when they will announce not only the second round of this, but also the R Consortium benefits additional community based endeavors as well. So that's a separate process and we hope to share more news about that later on. But yeah, lots of lots of cool things that you know there's never been a better time to you know try out especially if you're new to a certain area

chances are there's a package for that or a set of packages for that and with the R Consortium's grants that's just another step to keeping them stable and reliable for us for the foreseeable future. Let's head over to the visualization corner once again, Mike, and as always with the audio nature of this show, we will do our very best, but I do want to say we are going to talk about a

new to me type of chart that I think is an attractive alternative to one that you've likely seen before, especially as you try to look at how things change over time in certain processes or flows, if you will. So this highlight is talking about the new GG Cord two R Package authored by world renowned visualization specialist Nicole O'Reny. She has been on these highlights many, many times over but with good reason she has really pioneered a lot of these first in class tools

to produce you know novel visualizations in R especially with ggplot2 and give us some wonderful resources to educate ourselves how to make that happen. So yes, her blog post here is getting started with the gg cord two package, and at first right off the bat let's tell you, especially if you knew like I was, what exactly is a chord diagram? You might say this is a different representation of one that you may have seen before,

and a lot of you out there may have seen something called a Sankey chart, where it kind of looks like almost like a river of sorts in color, where you have one starting point, one ending point, and you have different so called streams that can kind of flow back and forth and go maybe go to the same stream or go to a different destination. GG Cord is going to put a more circular nature on that where you'll have the circular type of chart,

and the way that the connections are drawn in this, say between different categories, is you'll have these curved ribbons drawn inside of a broader circle, but the width of it determines the size of the relationship in that flow. So you can at a high level, at the first glance of this plot, see which of these categories have the strongest connection. So to get started with it, of course, first the package is on CRAN, so you can install it from there. And one interesting note, I applaud, Nikola for doing this,

this one is not hosted on GitHub, This one's hosted on GitLab. This is a friendly reminder out there. Yes, a lot of us rely on GitHub quite heavily, especially if you're in an enterprise, but there's more than one game in town, so to speak, for hosting your package code and GitLab is a very viable alternative to this. I've seen others in the community start to get onto CodeBurg and there are a lot of interesting choices in this space, but packages like, pack will let you install packages from not just GitHub, you just have to put the repository prefix in front or the provider in front, which in this case is gitlab::

and reneeggcord2. So that was a good little, side tidbit here and the site for ggicord2 is also hosted on git lab pages, which she has blogged about before that we probably featured on a highlight in past weeks. So you got the package in and then right off the bat you got yourself a base. She gives you a basic example looking at some fictional type of data for what kind of flows can happen between different countries like The U. S, China, Germany,

and seeing what this looks like. Where you set it up, you can set up a few ways, but the easiest way is a data frame. One column for the source, one column for the target, and again these would be the country names in this case, and then the last column being freak or frequency, and that is going to give you this strength overall of this flow between these two destinations. And yes, you can have flow going to the same place, I. E. From U. S. Back to U. S, and that will be reflected in the chart.

So to get this going after you load the packages and got your data set, you just call ggplot like you always would and the mapping again very familiar to a ggplot2 user, you have your aesthetic function aes, and you simply give source, target, and freak. You could use those same names in your data frame, but you don't have to. It's just those are the three aesthetics that you're required to do, and then you add on to that the geom core diagram, custom geom from the package, and you will see, you know, right off the tin you got a black and white version

of this graph. You likely wouldn't want to stick with that representation, so it's very easy in this case to say change the colors based on, you know, the fill aesthetic in the mapping that you define here. So you just say fill equal, in this case, source, and it will assign automatically the colors to the three countries. Very good. But if that that may be quick for, an MVP type visualization. If you want more customization with this, that's where, again, fitting with the ggbaud2 ecosystem of extension packages,

everything's a layer. So you could easily do your mapping up front and then layer in one by one the three key pieces of the arcs, the sectors, and the labels. Those are all geomcordthe three things I just mentioned, and within those you could fill in custom options as you see fit. What you might want to do, you can edit the appearances so that maybe the axis labels also have different colors, you could easily do that. You could also add some additional styling

with your familiar techniques with ggplot too, maybe doing a different color palette for the scale and the or for the color and the filling and then maybe removing the typical black you know, or gray, I should say, background, voiding that theme, and then maybe removing the legend. So you got all these customizations at your disposal, as well as doing additional tweaks such as where do those, how do those labels of the categories get displayed, whether you want to do like a perpendicular kind of thing or a curved label, which I think is pretty nice. And then she concludes the post by replicating

what it might look like to take what was a Sankey diagram and convert it to a chord diagram. And she saw one of these plots in the wild looking at how voting changed between you know parties in Westminster between 2024 and twenty twenty six local elections Sankey chart I should say looks pretty decent but then when you convert that to a core diagram with ggcore2,

it's actually pretty easy once you got your data set up, which has got a CSV as an example, you just can get a very great looking plot with just the basic calls and then also customize it a bit further by say doing your own color palette and again changing the limits of the x axis labels, x axis being literally around the circle in this case because it's a radial coordinate system. That can be a gotcha sometimes as you're trying to customize all this, but this is really intriguing. I have not seen these in the wild.

I have only seen Sankey charts about this kind of thing, but yeah, I think this will be another one I add to my toolbox if I have to visualize how things are changing over time between different categories. So Nicole, as always, wonderful blog posts, everything reproducible and the package looks fantastic to me. I couldn't agree more. You know, I think the way that she styles these charts is is absolutely beautiful. That's one of my biggest takeaways that I always learn. Some sort of data viz tip or trick from a Nikola post.

One that I learned today is I really like these color palettes that are leveraged in the scale color brewer and scale filled brewer. It's this dark two palette. I think it's great contrast between the three different colors. You have kind of a a burgundy orange, a nice green, kind of a soft darker green, and then a soft purple as well and it's really visually appealing. I would probably imagine that it's fairly color blind friendly although I don't want to make that

perfect assumption but there's not a whole lot of, you know, sort of blue green going or red green going on in this chart. I think, you know, one takeaway here for these chord diagrams, if it's something that you're interested in is with a few different categories and a few different flows, it's, you know, fairly straightforward to interpret what they're trying to communicate. But as soon as you have, you know, multiple categories and a lot of different flows, it can start to be a little bit difficult. And Nicole even has sort of a cautionary post part of this post that says chord diagrams aren't usually the most well understood charts. She would actually argue that a couple of stacked bar charts might be the easiest way to communicate this type of data especially when you have lots of categories and lots of flows between

these categories. So, she advises making sure that you add some verbal verbal or textual explanations of how they should be interpreted along with your core diagrams if you so choose to put them together but it's an interesting way to, as you mentioned, Eric, I was mostly familiar with Sankey charts as well. It's an interesting way to sort of package up these Sankey charts into a more circular structure. So, really appreciate the work that Nicole has done here. If you're interested in this GG Cord two package,

it she has some additional features plan that might excite you as well including a GM chord diagram interactive future function that she's working on which will integrate with the G Giraffe package which would be super cool and I think potentially lend some additional functionality and capability for users to be able to actually hover over elements of these chord charts to better interpret the takeaways and the underlying data behind these charts.

Very cool. Really appreciate, Nicole's blog post as always. Yes. And she also mentioned that this is not the first attempt at putting chord diagrams into R. There has been attempts at doing this in base R type of visual, you know, constructs as well as another one in the ggpod2 ecosystem, but she really made an attention to developing this so that it could really fit alongside

how these extension packages give you the best of both worlds. New geome, if you will, but also the ability to keep using your same techniques for ggpod2 customization, doing the additional, you know, layer customization. It is really a fit for purpose in that specific coding style that we often do with ggpod2. So I appreciate that you know she wanted to make sure that note was in there in the post because sometimes

when people see that there is yet another package or something they always wonder why does this one exist? Well she makes it very clear why this one exists And the fact that, you know, I'm going to be, you know, very blunt here. I trust a lot of what Nicole Hub produces out in the community. She's earned her reputation. I'm always one of those people that, hey, I'm always open to the many you know variants in the R community but certainly there are those in the open source side of things that they have a proven track record.

I give them the benefit of the doubt a lot of times when I when I try to pick the things I'm going to opt into for my next visualization or any other data analysis needs. So yeah, straight from the source here, think it looks excellent to me. And rounding out our highlights today, well in the world of 2026,

actually we were literally just joking about this before we got this segment going. Yes, we are living in the world of AI and leveraging large language models, the help of our development amongst many, many other things, And I'm happy to say at least in the R ecosystem, got some really interesting ways to build our custom tooling, custom development, but a lot of times you may have to get a little creative, so to speak, in how you, you know, interact with these LLMs, these agents that you're working with.

And there has been someone we value quite highly in the community that's been blogging about his recent adventures and tutorials and now he's leveraging this in R effectively. We are speaking about the esteemed Albert Rapp who's also authored quite a few highlights in the history of this show and his latest blog post as part of his three minutes Wednesday series Straight to the Point with some great examples is titled Our Black Magic for LLM

Prompting. As always Albert comes swinging with the clickbaity type headlines but it's all good, it's all good. I have fond memories of meeting him at POSICONF a couple of years ago nonetheless. So in this, it's a continuation of the series that he's been starting with this and this one is turning the attention to prompts themselves, I. E. When you are talking to an agent and you're feeding it what you want to ask about. A lot of times it's not just about your actual question. You need to give it some background,

give it some reference material, and especially if you're doing this in a data context, you might want to give it, you know, either glimpses of relevant data structures, additional things that may be already in your R session that you just want translated into a way that the prompt can, you know, take it, you know, quite nicely. So his goal here is to demonstrate to all of us how inside your prompt you could feed in just some arbitrary objects such as a vector of things, a list of things, and yes, even a data frame

that could be used as part of your actual prompt. So how the heck are you going to accomplish this? Well, the goal of this is to create what amounts to, if you're familiar with string processing and R, might know about the wonderful Glu package offered by Garage and Buoy, I believe, and this is a wonderful package that lets you interpolate in a given string with placeholders different things to go inside of that string but inject it dynamically

via the curly brackets by default you can change it any delimiter you want, but Albert wonders in this post can we do the same thing for our prompt and that is a great question. You might just think could we just do this with glue itself actually correction hot correction the glue package is offered by Jim Hester. Sorry Jim I literally just looked it up Don't send the feedback yet on that. Anyway, better late than never. Back to the original point.

So with, you might think, well, just use glue, right? Well, maybe, maybe not, because with this case, what if we already have the objects, it's not just, you know, is great for those kind of singular values. There is some stuff that comes with like collapsing things together, but if you just want a low friction way to get these objects into your prompt string, Albert walks us through what it would be like to create

a gluprompt function and where you could make it resilient to whether it's just a vector of things, a list of things, or a data frame of things. So how do we start this? And this is where we're going to tap into a package that was built, I want to say now, a couple years ago in the world of object oriented programming, but has gotten a lot of positive buzz around it, and that is S7. S7 was actually born out of an R Consortium grant, I believe,

and it's spearheaded by Hadley Wickham at POSIT, amongst others, as this kind of in between of S3 and S4 in a somewhat like more accessible, you know, DSL, so to speak. So if we want to use s7 to do this, this hypothetical glue underscore prompt kind of function, first need to start a what's called a generic, which will be basically the name of your function and the name of the argument, in this case just X,

and then you got yourself a generic, but it does jack squat right now because if you just try to run that on its own with a vector or things, it's going to say, I can't find a method for this. What do you want me to do? That's why you got to do a method for these. And this is where it gets interesting because the first method that he touches on is probably the most common one, is you have an object with character stuff in it. So S7 comes with these different class decorators, one called classcharacter, where you can use that as the method call as your second argument to the first argument being your function or your generic name,

and you can just supply what function it actually runs when it does that method, and in this case it's just a paste zero with a comma and a space as the collapse parameter so this will work now your generate underscore prompt function call with an arbitrary set of vector character values will indeed be like Paste zero. Great, that's one step. But of course, the whole point of this is what about the other types? What about if you want to deal with things like integers?

Well, the bit of interesting parts here that are new to me is he has built in this object called transformable to char, where it is basically using these s7 kind of class decorators and doing class underscore numeric the or operator class underscore vector or operator class underscore logical meaning covering integers with or you know even non integers with decimal points of numeric

covering the factor type as well as the logical type I. E. True or false and then the method for this is literally converting that to character and then running that same generate prompt method with the default method of the character method. So in this case, you can feed in a set of integers one, two, three, four, and you will get character versions of one two three four likewise with true or falses you'll get character versions of true or false.

Now, what about data frames you ask that's the next big ticket item Recall, if you've been familiar with R for a bit, a data frame is actually just a collection of lists, each with the same length and within that column the same type. So we'll get to that in a little bit, but in terms of data frames, what is a neat way that most web languages translate communication back and forth?

If you said JSON, you are exactly right. We often use JSON notation in these APIs, and yes, behind the scenes when you call these agents, it has been shown, which you could do with Elmer, to see that JSON is being passed back and forth between your R console and the LLM that you're calling. So he has now another method for the DataFrame class, which is classdata. Frame. It's simply using the JSONLite package. Just translate that DataFrame to JSON,

and we all know the JSON itself can be represented as a string quite easily so it ends up just string you know turning that JSON blob of a data frame with two columns into a string Now back to the dispatching part of lists, that can be, you know, used in a novel way here where you might now do another generator or method, I should say, classlist, and then with a clever use of the imapchar

function and purr, basically got really creative here. He, you know, injected an entry, an ID, and then using generate prompt with the other part of the list. So you have to kind of see this in the blog post, but this can be interesting where you've now got a list of things, say x equal one, y equal the word great, and then a df of a data frame, and it gives in the output the entry name, which was the object x,

and then the entry y, which is great, and then the entry df, that JSON notation. So basically, you took everything you built up to that point, built a generic for catch all lists, and then dispatched it to the appropriate methods after that. So notice we never even got to putting this in an LLM yet because he's saying that's for next time folks, but this is an interesting thing, food for thought, whether it's for LLM prompting or even just general string processing. The utility that you get when you combine a try and true package like glue type of principles,

but also combine it with object oriented programming. So there is a use case for many of these things here, and I can't wait to see how he ties it all together in the next, series of this, three minute Wednesday, series that he has here. And of course he has a link to a more, you know, more verbose video that treats all this with generic functions that we'll link to in the show notes if you want to see what this looks like in the real situation. So Albert wonderful job as always to leverage an existing community,

endeavor of a package with object oriented programming and taking us to school a little bit on just what we can do with it. Yeah, it's fantastic. And I mean, what a great use case to demonstrate object oriented programming to handle different classes of inputs and return them gracefully as sort of the same class of output because obviously, we know nowadays in your your prompts that you're going to give to a large language model. Especially if it's programmatically like this, it's just a a text string. It has to be a text string And doing some of the things that we know in terms of prompt engineering to try to get the most accurate response out, like formatting your data as JSON

or, you know, sort of tagging, you know, different parts of the prompt and making sure that you are modularizing the inputs within your prompt and organizing things well are really important in terms of the output accuracy that you're going to get. So the ability to do that in programmatic workflows like we have with R can be really, really powerful here. And fortunately, we have a great ecosystem of packages to be able to do that. First off, handling

the different data types through object oriented programming like s seven. If you haven't messed around with object oriented programming in R yet, this is a great sort of tiny little blog post starting point for you, a great use case. I am just as guilty of creating functions in R that take an argument and say, if the argument is a particular type, then do this with it. And if it's this other type, you know, coerce it first and and having, you know, a few different if statements or switch statements depending on the the type that came in and there's

it's not a pretty way to handle those situations especially in the face of the fact that there is a pretty way to handle those types of situations and it's called optic oriented programming in R. So, you have found yourself guilty of that same thing, this might be a great place to look to set off that light bulb in your head and say, oh, there's there's truly a better way to do this. I don't know if you've ever been guilty of that as well, Eric, or it's just me. I feel seen. Yes, I definitely have. And it's come up in some reviews from other colleagues in our stat group that, you know, say, Hey, S3 might've helped here. I'm like, Yeah, you're right. It probably would have, but I just was set in my ways. And now

I'm definitely looking at ways to build more elegant interfaces, especially for packages internally that could be used outside of perhaps my immediate use case, which is a back end package for a Shiny app to offload some of the business logic. But if we say, Hey, if you don't like my app, can use my package. Well, you want to make that a first class experience. So yeah, I definitely will tap into this quite a bit. A 100%. And it kind of makes me wonder if, you know, I know Posit has been putting out a lot of AI assistance within its products to be able to do data science type of AI assisted

work which can be tricky, right? Because you're not just dealing with code, but sometimes you're also dealing with data in the mix there. And how do you provide efficient representations of that data or list type objects or model type objects in a representation that an LLM can understand and then work with. So I wonder if under the hood in some of those assistance deposits building, some of these same things are going on in order to turn those different data types into something that's sort of more friendly to these large language models. So this might be a peek under the hood as well in terms of how all that happens. But if you are trying to do something similar in your own workflows, this is just a fantastic blog to give you a starting point.

Funny you mentioned that Mike, as I was thinking about, yeah, I wonder where this is being used, I. E. Kind of S7 in general. A great way to discover this folks. There are many techniques to do this, one that I always go back to just because I'm an old timer of R, this S7 is on CRAN. So if you go to CRAN or search for S7 CRAN or whatever, you'll find the CRAN page. There's always a section called reverse imports. This is the list of packages that have declared S7

as a dependency package in its own imports field of the description file. This is where if you peruse the names of these, you can find that a lot of the AI related packages that POSI has been creating, I'm looking at Query Chat, I'm looking at other ones in this space, Elmer itself, S7 is the driver of a lot of this functionality. So a lot of times I find the best way to learn, especially if you've seen the vignettes about S7, there's like six of them, so there's a lot to choose from there.

If you want to see what it really, really looks like in the wild, look at the source of one of these packages, then you'll really start to see just what the potential is. So I think there is a method to the madness, as the old timers might say, that S7 is being very prevalent as a back end to build on object oriented programming, and especially for this tooling around AI. So very interesting find there. Heck, even that package you name dropped back in the other segment,

GGIRAF or GGiraffe, however you want to say it, that also uses S7 too. So there's there's a lot of utility here. So Albert, you gave us a teaser for it, but yeah, we got some interesting things we can pursue, maybe someone he's shared with us. Well, it's a great catch looking across these reverse imports. You got shiny chat, Tidy LLM, Tidy Prompt. So I think we're onto something. We're onto something. It's actually kind of similar to when you look at the Shiny ecosystem. Shiny itself leverages r six very,

very heavily, and a lot of the extension packages in the Shiny ecosystem, My Humble One included, Shiny State also leveraged R6 quite a bit. So that could be a whole another episode in and of itself, it's like, well, how do you choose between these? Yeah, obviously the cliche answer is it depends folks, but it really does depend on what you're trying to build, but it is interesting to see different use cases for each of this. So yeah, lots of, it was a bite sized post, but yet it gave us a lot to ponder. So Albert, you you mission accomplished yet again.

And there is a lot to ponder the rest of this issue too, folks. So I had a lot of fun curating this one even when I had the, near panic on that Saturday night of getting it out there as quickly as possible, but you know we got a lot of good highlights here and that's thanks to many, many of you in the community that are sharing your knowledge, sharing what you've learned, sharing your packages that you've built. Lots of great things here. Don't have enough time to go into all of them today, but there are lots of things from environment management to what it's like to go into peer review and mentorship process in R Open Sci

and yes, some great visualization packages that I have some nice, pictures of in the post as well. You can kind of see what we got going on there. But also we love to hear what's going on with you and also your feedback about this show itself. We would love to hear from you. Got lots of ways of doing that, and one of them is, of course, helping the project itself at OurWeekly. Ourweekly.org is where you go, and if you want to send us a link to that new package, that great blog post, that great community event that's about to occur.

We're a poll request away folks. It is on GitHub, the little octocan in the upper right will take you right to the poll request template. We'd love to get your contribution and feature it in our next issue And we love to hear from you too in the community and what you've got going on. And certainly it was great to see our last episode. Got some nice kudos from the people we featured on that. Sounds like Chector is about to have some nice enhancements according to James Bellatuma, so I'm definitely looking forward to that. But how did he communicate with us? Well, found us online.

I am on Blue Sky, I'm at our podcast at bsky.social. I'm also on Mastodon where I'm at our podcast at podcastindex.social and I'm on LinkedIn just search my name and you will find me there and Mike where can the listeners find you? You can find me on blue sky at mike thomas. Bsky. Social or on linkedin if you search catch brook analytics k e t c h b r o o k you can see what I'm up to lately yes I did see that post of you doing your your awesome workshop earlier this week looked I get a packed house for that so yeah lots of good stuff happening over it at Kutchberg folks so you know how to find them if you need any help there

but, with that we'll close-up shop here for episode two thirty five of our weekly highlights we thank you so much for joining us and we hope to see you for 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