#tidyr
In the alt text of the flower photo I took is my day 8 solution for #AdventOfCode in #rstats
It's igraph time, and while I don't know igraph well (there are probably more elegant uses out there) I know a minimum spanning tree problem when I read it (and I read it in part 2)
December 8, 2025 at 9:23 AM
I do take the point, but I don't think it's entirely fair either to say that tidyverse and pandas are almost equivalent, and then contrast native Python negatively without also contrasting doing the same thing in R _without_ dplyr/tidyr - also external packages.

Love his book, mind.
November 13, 2025 at 7:31 PM
For #30DayMapChallenge day 5: Earth, I wasn't particularly motivated until I remembered that one guy in Auckland (AoNZ will understand what I mean) so learned to process geojson- Earthquakes (+) over 3.5 Magnitude, south of -38.8 and where and how strongly they were felt. #rstats code in alt text
November 6, 2025 at 2:20 AM
Going out on a limb here but the most exquisitely designed deeply domain specific functions in the #rstats #tidyverse are probably the tidyr::separate_ family.

separate_wider_regex() is my main. The patterns arg! Beautiful. The debug mode! So sympathetic to the user’s whole process.
November 4, 2025 at 6:35 AM
There's a lot of good #rstats advice here. I try to use the pkg::function method. Though it can become tedious. For example if you're using dplyr and you want to use dplyr or tidyr functions within commands they can get unwieldy. Like dplyr::select(dplyr::allof(xx)).
There's a few rules I've adopted for data analysis this year that have helped me out a lot.
October 18, 2025 at 5:10 PM
#rstats
Just discovered something weird:

na.omit() and tidyr::drop_na() give different rownames when you select rows in their result.

Does anyone have an idea why this is so?
October 16, 2025 at 12:08 AM
R
{tidyverse}
%>%
<-
{palmerpenguins}
tidyr::pivot_longer()
dplyr::group_by()
Quarto
purrr::map()
dplyr::mutate()
VS Code!
R 🆚 Python
Base R 🆚 Tidyverse
%>% 🆚 |>
<- 🆚 =
T 🆚 TRUE
iris 🆚 penguins
gather 🆚 pivot_longer
group_by 🆚 .by
Quarto 🆚 RMarkdown
map 🆚 lapply
DT[, z := x + y] 🆚 mutate(df, z = x + y)
RStudio 🆚 Positron
#rstats 🆚 #databs
October 10, 2025 at 4:36 AM
The {tidylog} #RStats 📦"provides feedback about dplyr and tidyr operations. It provides simple wrapper functions for almost all dplyr and tidyr functions, such as filter, mutate, select, full_join, and group_by. By Benjamin Elbers
github.com/elbersb/tidy...
December 10, 2024 at 8:40 PM
Great new pivoting methods #pivot_wider and #pivot_longer are coming to #tidyr package!
https://tidyr.tidyverse.org/dev/articles/pivot.html
But is it really wider? 😉
@hadleywickham #rstats #tidyverse
November 16, 2024 at 12:53 PM
Plot some variables against many others with tidyr and ggplot2 <a href="http://drsimonj.svbtle.com/plot-some-variables-against-many-others" class="hover:underline text-blue-600 dark:text-sky-400 no-card-link" target="_blank" rel="noopener" data-link="bsky">http://drsimonj.svbtle.com/plot-some-variables-against-many-others via @drsimonj
Plot some variables against many others with tidyr and gg...
Want to see how some of your variables relate to many oth...
drsimonj.svbtle.com
November 9, 2024 at 8:44 PM
Is your longitudinal data currently in long format, but you need it in wide format, or vice versa? No worries! It is easy to restructure your data in R using the {tidyr} package.
#rstats #edresearch

You can find more examples here: github.com/Cghlewis/dat...
December 7, 2023 at 2:07 PM
El paquete {reshape2} fue abandonado (superseded) hace años, igual que las funciones gather() y spread() de {tidyr} 🙁 Parece que es una guía un tanto desactualizada
January 2, 2025 at 2:21 PM
Trying to spread (tidyR) more than one value column at once using the same key column. Any tips? (@hadleywickham) #rstats
November 14, 2024 at 9:52 AM
Same as yesterday, but this time, making a 2D Discrete Random Walk with my #R #Package #RandomWalker

#R #RStats #RProgramming #RandomWalks #Visual #ggplot2
May 15, 2025 at 12:14 PM
That used to be more the case, but Hadley Wickham developed an ecosystem called "The Tidyverse" or "TidyR", made up of packages designed to make R a full-featured data science language.
November 30, 2023 at 8:13 AM
If Saturday was the day when pivot_wider() *changed* my life, today is the day that pivot_longer() *saved* my life!
#rstats #tidyr
March 26, 2025 at 11:09 AM
I love how I have never used Stata and can fully relate to this because every language has a confusing form for the reshape function

For me, it would be

?tidyr::pivot_wider() and
?tidyr::pivot_longer()
October 25, 2023 at 5:24 AM
I agree, but also I feel like dplyr/tidyr just creates such a dependency rats nest and is more of a headache than it's worth, particularly in the context of package writing.
November 15, 2024 at 12:27 AM
Forgot `tidyr::unite`exists and spent a lot of time writing some very, very silly case_when()'s.

Don't be me.

#rstats
September 12, 2025 at 4:00 PM
{tidyr} to the rescue again - `uncount`: 1 row becomes 6😁

Saves copying and pasting in Excel.

#rstats
November 5, 2025 at 3:27 PM
Thinking of expanding on this… like a “here’s how you’d do it in a dplyr/tidyr” and “this is how to do it in arquero” notebook.

(similar to how Allison Horst translated observable plot concepts from a ggplot lens).
July 20, 2024 at 6:34 PM
A good post! <3 DuckDB

I would maybe quibble that it's worth adding a footnote about the packages you need, specifically RE: `dbplyr` (which will power a lot of what you need to translate your dplyr/tidyr/etc code). That's only so someone who tries it out isn't blindsided by installation issues.
May 1, 2025 at 7:16 PM
Don't forget that you can also pass tidyselect helpers!

If you have a pattern of columns, say address_1, address_2, ..., but you don't know how many, you can `unite("address", starts_with("address_"), sep = " ")` which is difficult to do otherwise without breaking your flow.

<3 tidyr
September 24, 2025 at 2:26 PM
The operation with many names: pivot_longer (tidyr), unpivot (polars), melt (pandas), fold (arquero). Here's a fork using arquero: observablehq.com/d/0b847c3547...
Boring Plot Doc pt. 1
I like Observable Plot a lot. It's super powerful and makes a lot of charts faster to write. But there are some pretty tough challenges to making basic plots that I think aren't very well-documented. ...
observablehq.com
December 15, 2024 at 2:33 AM