Friends Don't Let Friends Make Bad Graphs! Do you agree with the examples of bad graphs and the alternatives Chenxin Li (@chenxinli2.bsky.social) lists at https://github.com/cxli233/FriendsDontLetFriends #RStats #graphs #dataviz #help
I'm a data scientist with a background in genomics, working at a growing Swedish biotec company. Using mostly R.
Here I'm posting mainly about tips and tricks I wished I knew earlier. Posts are partially scheduled and resources shared are not developed by me.
Friends Don't Let Friends Make Bad Graphs! Do you agree with the examples of bad graphs and the alternatives Chenxin Li (@chenxinli2.bsky.social) lists at https://github.com/cxli233/FriendsDontLetFriends #RStats #graphs #dataviz #help
#rstats New blog post: Refactoring code with `flir`
`flir` is a package I created last year to detect and automatically fix bad practices in R code (similar to `lintr` but faster and with automatic fixes).
In this blog post, I explain how it can do more than that, for instance to replace superseded and deprecated functions in large projects.
https://www.etiennebacher.com/posts/2025-05-23-refactoring-code-with-flir/
Handy RStudio addins for reshaping and navigating in code: https://github.com/lionel-/codegrip #rstats #rstudio https://floss.social/@lionel @_lionelhenry
Lets be honest, we spend too much time cleaning data. {janitor} can help with that: https://sfirke.github.io/janitor/ #rstats #datasciece https://a2mi.social/@samfirke
Easier debugging of piped analyses in R: https://github.com/MilesMcBain/breakerofchains by @milesmcbain #rstats #pipes #debugging
If you set limits for a scale (e.g. x-axis) in ggplot, how would you like data outside of that range be handled? There is the oob parameter for that and a set of functions to use with it: https://scales.r-lib.org/reference/oob.html #rstats #ggplot #dataviz
Visualize dependencies between functions: https://github.com/lewinfox/foodwebr #rstats
Make fancy tables: https://gt.rstudio.com/ #rstats #tables #dataviz
Add some swag to your ggplots, with fontawesome symbols and colors: https://nrennie.rbind.io/blog/adding-social-media-icons-ggplot2/ #rstats #ggplot #fontawesome #ggtext
R learning for applied statistics by Chenxin Li: https://github.com/cxli233/Online_R_learning A self paced course structured in R markdown documents, that starts from the very basic. #rstats #course #learning
{purrr} has some lesser known functions that make handling of failing function calls easier: safely, quietly, possibly: https://purrr.tidyverse.org/reference/safely.html #rstats #tidyverse
Interactive resizing of picture and table content in Rmd and Quarto: https://r2resize.obi.obianom.com/index.html #rstats #quarto #rmarkdown
The {conflicted} package makes sure that namespace conflicts are solved explicitly and prevents unpleasent surprises: https://conflicted.r-lib.org/ #rstats #failearly
I have a habbit of making (too) many (small) packages for functionality that might be reused in different context. {box} might be an alternative by making scripts into modlues that can be loaded: https://klmr.me/box/ #RStats #packages #waysofworking
Linear programs help to find optimal solutions based on a set of constrains. I used {ompr} before, but the new package {tidyLP} looks promising and integrates with the tidyverse. #rstats #linearprograms #optimization https://github.com/colin-fraser/tidyLP https://dirkschumacher.github.io/ompr/
Base pipe vs magrittr pipe: a thread by TimTeaFan: https://threadreaderapp.com/thread/1582118234220007424.html #rstats
The fastverse is a suite of complementary high-performance packages for statistical computing and data manipulation in R. https://github.com/fastverse/fastverse #rstats #performance #fast
Customize what happens when you start R: https://henrikbengtsson.github.io/startup/ #rstats #environment
Rawgraphs is another tool to make figures without R: https://www.rawgraphs.io/ #dataviz #ui #nocode
You dont like the default color palett of #ggplot? You can change it: https://stackoverflow.com/questions/10504724/change-the-default-colour-palette-in-ggplot #rstats #dataviz