Sign in

Leonardo Hansa

@leonardohansa.com
1.1K followers 561 following 115 posts

Some companies prefer making decisions based on data rather than opinions. I can help deciding which data to use.

PostsRepliesMedia
Leonardo Hansa @handle.invalid · 12/02/2026
Strange but efficient way of updating values on a list in R. Makes sense after you're explained how object copies work. kaizen-r.github.io/posts/2026-0... #rstats
050
Leonardo Hansa @handle.invalid · 19/05/2025
While attending online meetings, today I'm listening to Marin Marais by Brandon Acker and Craig Trompeter in the background. It's the only thing worth it in today's meetings.
010
Leonardo Hansa @handle.invalid · 30/03/2025
On our next podcast episode, @joscani.muestrear-no-es-pecado.es and I talk about how to correct your model's optimism using bootstrap. You train your model on each sample and compare its fitness metric against the original sample. The average of differences is your correction. Soon on Spotify
001
Leonardo Hansa @handle.invalid · 30/03/2025
Have you ever done a bootstrap plot? I don't know if it's valid, or even useful, but I just have. Just for fun. Sepal Length bootstrap density #rstats #dataviz
281
Leonardo Hansa @handle.invalid · 18/03/2025
For quick tests these days I'm using R GUI. I've just realised one of the most accessible buttons is the `Print` button. Who on Earth (and when) could be interested on printing a script? #rstats #20thCentury
230
Leonardo Hansa @handle.invalid · 28/02/2025
Is this a barplot? Where all bars have the same length and you need to read the labels and quantify their difference with your imagination? Source: Lego . com #dataviz
000
Leonardo Hansa @handle.invalid · 15/12/2024
Advise requested -I haven't yet used #NotebookLM. Somehow I find it a super powerful tool, though I haven't still figured out what for 😅 Any use case you're willing to share and you consider inspiring? 🙏
010
Leonardo Hansa @handle.invalid · 06/12/2024
I can't get used to indicating the percentage of a percentile as a percentage... Yeah, I know the sentence makes no sense, but I've always used proportions, a number from 0 to 1, not 0 to 100. Creating confidence intervals with 2.5 and 97.5 instead of 0.025 and 0.0975 seems like cheating. #stats
000
Leonardo Hansa @handle.invalid · 04/12/2024
Fiddling around with #aRtsy library(aRtsy) set.seed(6) canvas_slime(colors = colorPalette("vrolik4"))
020
Leonardo Hansa @handle.invalid · 04/12/2024
Loving the #aRtsy project for creating beautiful random images with #rstats github.com/koenderks/aR...
121
Leonardo Hansa @handle.invalid · 28/11/2024
During my first steps with #rstats, @posit.co's cheatsheets helped me out a lot easing the learning process. One of the (many) things I still struggle with on #Python is #dataviz, because of my love towards #ggplot2. Perhaps the matplotlib cheatsheets can be the key matplotlib.org/cheatsheets/
Cheatsheet for matplotlib
200
Leonardo Hansa @handle.invalid · 20/11/2024
Great tutorial by @albertrapp.bsky.social on #ggplot2 and some more #rstats extensions on how to do the plot on the image. Very well guided and lots of tiny tips on how to improve your #dataviz www.youtube.com/watch?v=e0_C...
150
Leonardo Hansa @handle.invalid · 20/11/2024
I didn't know you could assign a class to an error in #rstats, using the rlang package. This allows you managing your tryCatch based on different error classes. PS. Yeah, I guess for #Python users this is like an obvious thing.
Code for assigning a class to an error in R via the rlang package
040
Leonardo Hansa @handle.invalid · 20/11/2024
I'm starting to apply cli #rstats package after @hfrick.bsky.social's talk at Spanish R Conf. Question on best practices: which is the best approach to stopping execution and sending nice messages via cli? Should I use `cli::cli_alert_danger()` and then `stop()`?
First page on cli R package documentationExample of error messages with cli R package
150
Leonardo Hansa @handle.invalid · 18/11/2024
I'm loving the officer #rstats package. Yeah, I know, Quarto slides blah blah... Look, sometimes (not often fortunately) I'm asked to do a PowerPoint. The officeverse is the way. ardata-fr.github.io/officeverse/
Text introduction to officeverse, a set of R packages oriented to work with Microsoft's Office package.
030
Leonardo Hansa @handle.invalid · 14/11/2024
Last week, my teammate Paula and I presenting our 'Confession: we develop software in R and Excel', our talk at the Spanish R Conference. Slides (in Spanish): ebiquityds.github.io/CongresoRSev... #rstats #Excel
181
Leonardo Hansa @handle.invalid · 11/11/2024
Last week, 14th Spanish R Conference. 14 years of #rstats gatherings, 2 days of talks and workshops. Inspiring. Awesome. Thanks a lot to the organizers!
Picture of 14th Spanish R Conference attendees
0117
Leonardo Hansa @handle.invalid · 25/10/2024
People seem to take a break from statistics on Google while Christmas
Google Trends for "Statistics" worldwide during the last three years. Seasonality with decrease during Christmas
020