Matt Kmiecik
@mattkmiecik.bsky.social
200 followers 340 following 140 posts
Neuroscientist studying Parkinson's disease | check out my #rstats website: https://mattkmiecik.com/
Posts Media Videos Starter Packs
Pinned
mattkmiecik.bsky.social
R is my favorite programming language! When reflecting on my R journey, I realized that how I name objects has changed over the years, and this change reflects a difference in how I approach my workflows (and some serious laziness in typing). #rstats

Post: mattkmiecik.substack.com/p/creating-o...
mattkmiecik.bsky.social
Maximizing information while minimizing clutter is key to a great figure. In this post, I cover my approach for various figures throughout the years.

Read more: mattkmiecik.substack.com/p/my-favorit...

#rstats #dataviz #science #publishing
My favorite figures (to date)
In my previous post, I discussed my pipeline for making publication-ready figures.
mattkmiecik.substack.com
mattkmiecik.bsky.social
Certainly! I wouldn't recommend going to GUI if the data will change.
mattkmiecik.bsky.social
Yes! Don't get me wrong, everything is possible in ggplot2 and it's extensions. But I've found it nice to polish off figures in a GUI when at the final stages or experimenting with different aesthetics/placement, etc.
mattkmiecik.bsky.social
ggplot2 is powerful, but not always pretty. 😬

That’s why I use Omnigraffle for final figure touches—cleaner legends, custom labels, and full control over design.

Full workflow here: mattkmiecik.substack.com/p/using-omni...

#rstats #dataviz #omnigraffle #ggplot2
Using Omnigraffle for publication ready figures
In graduate school, I took an advanced statistics course that changed my life.
mattkmiecik.substack.com
mattkmiecik.bsky.social
Just dropped a new #rstats Substack post!

It’s about a better way to scale variables in R that won’t break predict() (and keeps your model inputs traceable).

mattkmiecik.substack.com/p/scaling-va...

#Tidyverse #DataAnalysis
Scaling variables in R
A walkthrough of a tip I recently learned
mattkmiecik.substack.com
mattkmiecik.bsky.social
Is there a formal way to give yourself permission or is this implied by CC-BY?
mattkmiecik.bsky.social
Z-scoring in R? There’s a neat way to retain the original mean and SD after using scale(). This makes back-transforming for plots super easy.

Full example: mattkmiecik.substack.com/p/scaling-va...

#rstats #Reproducibility #CodingTips
Scaling variables in R
A walkthrough of a tip I recently learned
mattkmiecik.substack.com
mattkmiecik.bsky.social
Scientific writing has trapped me in Word & Google Docs. For personal writing, I needed something better. Ulysses is that something. Clean, simple, and dare I say... fun?

Here’s why I love it:
✍️ mattkmiecik.substack.com/p/i-started-...

#WritingCommunity #TechTools #MacApps #ProductivityHacks
I started this Substack just so that I could use Ulysses
Alright, that might be an exaggeration.
mattkmiecik.substack.com
Reposted by Matt Kmiecik
vincentab.bsky.social
🚨 Big milestone for Rdatasets 🚨

The web archive now hosts 3400+ free and documented CSV datasets. Fantastic for teaching and testing!

And {Rdatasets} is a new #RStats 📦 for easy download and search

Web archive: vincentarelbundock.github.io/Rdatasets

R 📦: vincentarelbundock.github.io/Rdatasetspkg
mattkmiecik.bsky.social
I used to wrap scale() in as.numeric() and call it a day. Now I know better: drop() preserves attributes and behaves cleanly.

Full walkthrough (with mtcars, lm, ggplot2): mattkmiecik.substack.com/p/scaling-va...

#rstats #DataViz #OpenScience
Scaling variables in R
A walkthrough of a tip I recently learned
mattkmiecik.substack.com
Reposted by Matt Kmiecik
mattansb.msbstats.info
Personally I prefer using datawizard::standardize(), and specifically using it *in the formula*.

So
mtcars$hp_z <- scale(mtcars$hp)
mpg ~ hp_z

Becomes
mpg ~ standardize(hp)

This solves both issues you raise in your post.

#rstats @easystats.bsky.social
mattkmiecik.bsky.social
Nice! Thanks for commenting about datawizard::standardize(). It looks like a great solution 😀
mattkmiecik.bsky.social
Scaling variables in R? scale() is powerful — but its default behavior can mess with predict().

Here’s a clean fix using drop() + how to retain scaling attributes for later.

mattkmiecik.substack.com/p/scaling-va...

#rstats #DataScience #Statistics
Scaling variables in R
A walkthrough of a tip I recently learned
mattkmiecik.substack.com
mattkmiecik.bsky.social
This has to be the best #rstats hex sticker I've ever seen
mattkmiecik.bsky.social
One of my favorite tricks I’ve learned from ChatGPT: better facet labels in ggplot2.

Check out the latest post: mattkmiecik.substack.com/p/labeling-f...

#rstats #ggplot2 #dataviz
Labeling facets in ggplot2
Who knew such a small setting could make such a big improvement
mattkmiecik.substack.com
mattkmiecik.bsky.social
Adding labeller = label_both to your facet calls in ggplot2 can massively improve figure readability! I wrote a quick blogpost with a use case and some examples.

mattkmiecik.substack.com/p/labeling-f...

#rstats #ggplot2 #VisualizationTips #dataviz
Labeling facets in ggplot2
Who knew such a small setting could make such a big improvement
mattkmiecik.substack.com
Reposted by Matt Kmiecik
matloff.bsky.social
Most applications in R run pretty quickly. But these days, many R users are faced with huge datasets and/or long-running applications, making parallel computation attractive. 🧵 1/
mattkmiecik.bsky.social
Struggling with confusing facet labels in ggplot2? I just shared a quick fix that makes your plots clearer using labeller = label_both.

mattkmiecik.substack.com/p/labeling-f...

#rstats #dataviz #ggplot2 #DataScience
Labeling facets in ggplot2
Who knew such a small setting could make such a big improvement
mattkmiecik.substack.com
mattkmiecik.bsky.social
R is full of surprises—even after a decade, I’m still learning simple but powerful tricks. Named vectors are my latest discovery, thanks to ChatGPT!

mattkmiecik.substack.com/p/named-vectors-in-r

#RStats #Learning #ChatGPT #Dataviz
Named vectors in R
A powerful tool for plotting colors
mattkmiecik.substack.com