January 2021
January 24
Use {tabyl} function from {janitor} to quickly prepare a frequency table 👌
— R Function A Day (@rfunctionaday) January 24, 2021
Additionally, you can also use {adorn_} functions to make the printing even prettier!#RStats #DataScience pic.twitter.com/3BbKO83CSE
January 25
Often you might want to make a new column as a combination of a few other columns in a dataframe and {tidyr::unite} is exactly what you are looking for! 🪄 #rstats #DataScience pic.twitter.com/BeNs5nXz0T
— R Function A Day (@rfunctionaday) January 25, 2021
January 26
Use the powerful parser functions from {readr} to parse a vector into the expected type 🗂
— R Function A Day (@rfunctionaday) January 26, 2021
Helpful with messy, user-entered data where these functions can make educated guesses about what the input was supposed to be.#rstats #DataScience pic.twitter.com/5MGHmEM9Pu
January 27
The {model_performance} function from {performance} 📦 is a quick way to get detailed regression model summary indices for a huge no. of models! 📝https://t.co/vMpMVbz0x5#rstats #DataScience pic.twitter.com/VzPRICbIAg
— R Function A Day (@rfunctionaday) January 27, 2021
January 28
Tibbles are modern data frames and are ubiquitous in the {tidyverse}. But what if you want to build a tibble from scratch?
— R Function A Day (@rfunctionaday) January 28, 2021
The {tribble} function provides an intuitive row-by-row syntax to do so! 🧱👷https://t.co/UBRRJLyM47#rstats #DataScience pic.twitter.com/X8KlYkRCTF
January 29
Some functions may remove {NA}s in the data by default when one wishes to retain them.
— R Function A Day (@rfunctionaday) January 29, 2021
{replace_na} from {tidyr} can help here by replacing {NA}s with a specified value 🕵️♀️https://t.co/y4Of3tcexf#rstats #DataScience pic.twitter.com/XIodtKU7Xn
January 30
If you are feeling a bit ambitious and want to understand what is the abstract syntactic structure of your R code, you can use the {ast} function from {lobstr} package to draw a tree representation! 🦞 https://t.co/WbyECG3a4H#rstats #datascience pic.twitter.com/cgMZDz1vz1
— R Function A Day (@rfunctionaday) January 30, 2021
January 31
"All work and no play makes Jack a dull boy"
— R Function A Day (@rfunctionaday) January 31, 2021
So it's important to also have a little fun as part of your #rstats workflows.
To that end, you can use {say} function from {cowsay}! 🐮 💬 https://t.co/SmDKtEHbMC#rstats #DataScience pic.twitter.com/8AROLW8r3d