Grant McDermott's Avatar

Grant McDermott

@gmcd.bsky.social

Economics and data science | Former academic now working in the tech sector | Views my own | πŸ‡ΏπŸ‡¦ in πŸ‡ΊπŸ‡Έ | https://grantmcdermott.com/

4,787 Followers  |  140 Following  |  486 Posts  |  Joined: 07.06.2023  |  2.7216

Latest posts by gmcd.bsky.social on Bluesky

Thanks, just got back to my machine. I guess you've seen my reply on GH, but you need to name the `type = ...` arg since the second slot order is normally reserved for the `data` arg.

03.08.2025 22:35 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Just stepped out. Do you mind filling an issue on GH? github.com/grantmcdermo...

03.08.2025 20:44 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

(also unfair bc I haven't listened to the killers in years but I digress)

03.08.2025 20:26 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Self-serving, but reading this feels like I'm on the other side of an analogous situation where an LDS Church member is busy telling me that I don't*really* understand The Killers lyrics.

03.08.2025 20:25 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Comparing the spacing of the same tinyplot without and without themes.

Comparing the spacing of the same tinyplot without and without themes.

I don't think non-uniformity was the issue. Rather Frank doesn't like the default spacing of base graphics, esp. around the axis text and plot extent... But we offer much nicer spacing via themes; c.f. the reduction in whitespace in the rhs plot. (This is automated, but can be further customized.)

03.08.2025 18:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Great, please kick the tyres and let us know if you hit any sharp edges. I'll also be presenting at userR! 2025 if you're going to be there next week.

03.08.2025 18:10 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
plt(wageinc ~ age | gender, data=svcensus, type='lm')
plt_add(type='p', alpha = 0.1)

plt(wageinc ~ age | gender, data=svcensus, type='lm') plt_add(type='p', alpha = 0.1)

Sounds like you're looking for `tinyplot_add` (alias: `plt_add`)? grantmcdermott.com/tinyplot/man...

03.08.2025 17:58 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
tinyplot lm type without SE bands.

tinyplot lm type without SE bands.

Jumping across threads, but this should definitely work. As you said elsewhere maybe a conflict with the redundant with()?

03.08.2025 17:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Thanks for testing and the thread!

Nit: `with(...)` wrapping is superfluous here, since you're using the formula interface.

03.08.2025 17:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

πŸŽ‰πŸŽ‰

(dodging coming soon)

03.08.2025 17:04 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
R and the Model Context Protocol The newly released mcptools package makes coding assistants better at writing R code and applications built with ellmer more powerful.

mcptools, a package implementing the Model Context Protocol in #rstats, is now on CRAN!πŸŒ‰

We see significant opportunity with MCP and, at the same time, want to note that it's still a nascent ecosystem with serious security risks. www.tidyverse.org/blog/2025/07...

21.07.2025 13:37 β€” πŸ‘ 29    πŸ” 13    πŸ’¬ 0    πŸ“Œ 1

Yeah, a consistent user experience across sw was another motivating factor.

21.07.2025 15:18 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

First world + expat problems... But it genuinely vexes me that CBS/Paramount acquired the rights to all rugby content in the US just as they began their pitiful campaign of self capitulation before the current regime. www.nytimes.com/athletic/637...

Guess it's VPNs for the long haul.

18.07.2025 19:34 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Raised garden beds

Raised garden beds

In other news, <Operation Autarky> in full swing here in the Willamette Valley.

More "Dig for Idiocracy" than "Dig for Victory", but needs must.

18.07.2025 16:05 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

But remember that this is just a default. We expect that users will (still) specify what vcov they want at estimation time, or adjust "on the fly" afterwards.

18.07.2025 15:52 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

This was the result of a longer internal discussion, part of which is summarized at the bottom here: github.com/py-econometr...

Tl:Dr Old default is sensitive to arbitrary FE ordering. Picking a "robust" default has its own problems (why "hc1" vs "hc3"?, etc.) IMO 'iid' is the most neutral choice.

18.07.2025 15:50 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
From the fixest NEWS file: the new default VCOV is iid for all estimations. To change the default to the way it was, place setFixest_vcov(all = "cluster", no_FE = "iid") in your .Rprofile.

From the fixest NEWS file: the new default VCOV is iid for all estimations. To change the default to the way it was, place setFixest_vcov(all = "cluster", no_FE = "iid") in your .Rprofile.

#rstats #econsky PSA: The next release of `fixest` will include some important changes (plus cool new features).

E.g. Fixed-effects regs will now default to 'iid' SEs rather than clustered. github.com/lrberge/fixe...

You can install and test drive the dev version from R-universe; see the README.

18.07.2025 15:36 β€” πŸ‘ 30    πŸ” 9    πŸ’¬ 2    πŸ“Œ 0
Post image Post image Post image Post image

{tinytable} is a dead simple, ultra-flexible, and dependency-free #Rstats πŸ“¦ to turn data frames into beautiful tables: html, word, pdf, latex, typst, markdown, etc.

v0.10.0 has cool new features and important bug fixes. Check out the detailed tutorials at:

vincentarelbundock.github.io/tinytable/

03.07.2025 12:59 β€” πŸ‘ 289    πŸ” 69    πŸ’¬ 12    πŸ“Œ 4

Hmmm, I'd probably still stick with a bar plot and use `facet.args = list(free = TRUE)`.

Fwiw, you often need want this for faceted histograms too, as well as independent bin scaling. The ref page has some examples along these lines towards the bottom. grantmcdermott.com/tinyplot/man...

18.07.2025 14:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Retrieval-Augmented Generation (RAG) Workflows Provides tools for implementing Retrieval-Augmented Generation (RAG) workflows with Large Language Models (LLM). Includes functions for document processing, text chunking, embedding generation, storag...

#ragnar 0.2.0 is on CRAN #rstats!

It has a MUCH improved chunker; markdown_chunk() picks better boundaries, builds context, segments by headings, and handles overlapping chunks. Oh, and ragnar_retrieve() can deoverlap retrieved chunks now.

Website got a big update too: ragnar.tidyverse.org

15.07.2025 13:44 β€” πŸ‘ 41    πŸ” 16    πŸ’¬ 4    πŸ“Œ 1
How I’m using Claude Code to write R code | Simon P. Couch – Simon P. Couch

After a month or so of not using Claude Code much to write R code, I recently returned to using the tool most days. Giving coding assistants the ability to peruse #rstats package documentation via MCP is so, so helpful: www.simonpcouch.com/blog/2025-07...

17.07.2025 19:07 β€” πŸ‘ 61    πŸ” 13    πŸ’¬ 3    πŸ“Œ 2

I've never been to Durham, or NC for that matter. Would appreciate some visiting tips.

18.07.2025 14:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I'll be there, presenting on {tinyplot}...

18.07.2025 14:18 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Thanks for the post and test!

I think you probably want barplots instead of histograms here, though? grantmcdermott.com/tinyplot/man...

E.g., your final plot would be:

18.07.2025 14:09 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Yes. For these dynamic themes we already reduce the x axis gap by ~0.8 lines (code logic: github.com/grantmcdermo...) but that can be further reduced if a user wants. I'm out for the day, but can look into an example tomorrow.

13.07.2025 16:36 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Maybe we could bump up the "Themes" section in the intro vignette for higher prominence?

That said, we already have a dedicated theming vignette, plus a `tinytheme()` example in the README Quickstart.

I do plan to introduce themes early in my useR!2025 talk...

13.07.2025 15:30 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Beyond parody at this point.

13.07.2025 14:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Thanks! Exactly my (our) sentiments too. I love ggplot2, but there are still many cases where a more convenient base option makes sense. It's a big enough tent for everyone.

13.07.2025 14:46 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

I feel like @f2harrell.bsky.social brings this up with every tinyplot release notice... and we always respond by saying that themes are there to specifically reduce whitespace 🀷 grantmcdermott.com/tinyplot/vig...

13.07.2025 14:42 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Grouped line plot with direct labels

Grouped line plot with direct labels

Also includes a mini update to the "Tips & tricks" vignette: how to add direct labels to a grouped line (tiny)plot. grantmcdermott.com/tinyplot/vig...

12.07.2025 15:42 β€” πŸ‘ 8    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0

@gmcd is following 20 prominent accounts