Skip to content
Coming soon: Ally. Your guide to the world of AI and R. Learn More →
R for the Rest of Us Logo

Tips and Tricks

How to Clean Messy Data in R

December 10, 2019

Data Cleaning with R Interested in learning more about data cleaning with R? We now have a full course devoted to the topic. If you work with data, you know that you often spend as much — if not more — time gathering, wrangling, and cleaning your data as you do analyzing it. A 2014 New York Times article cites the truism that data scientists spend at least half of their time cleaning data. R offers a wide range of options for dealing with dirty data. The collection of packages known as the...

My R Journey: Harkanwal Singh

November 25, 2019

Harkanwal Singh is a data visualisation programmer, currently working at Westpac NZ. Previously, he established and led the data journalism desk at the New Zealand Herald. He is passionate about visualisation as code. He programs in R, JavaScript and Python. He enjoys teaching data visualisation in his own time. He loves reading words and code, both preferably of others.Why did you decide to learn R? In 2012, I convinced the editors in parent company of my newspaper to hire me as a data...

How to Make Beautiful Tables in R

November 12, 2019

Updated March 12, 2022 with info on the reactablefmtr and gtextras packages. It doesn't matter how good your data analysis is if you don't effectively communicate your results. In most reports, communication of results happens through a combination of data visualization and tables. Along with narrative text, these make up the bulk of content used to communicate results. Clear writing is a topic for another venue. Data visualization in R is a huge topic (and one covered expertly in Kieran...

My R Journey: Jon Harmon

November 4, 2019

Jon Harmon is one of the friendliest, most helpful people you'll come across in the R community (and, in a community known for being incredibly welcoming, that's saying something!). If you're involved at all with the R for Data Science Online Learning Community, you've likely seen his posts. There, he tries to "pay it forward" for all the awesome help he's gotten learning R over the last few years. If you follow the #TidyTuesday social data project, you may have heard about the Tidy Tuesday...

How to Make Functions in R

October 21, 2019

R is a functional programming language. Most of the time, you use other people's functions. But, as you become a more experienced R user, you may want to start making your own functions. For most people, the idea of making your first function comes when you realize you are copying and pasting code over and over. Maybe you're doing the same data wrangling on multiple data frames. Maybe you're making a nearly identical graph several times. The initial impetus to make a function is usually that...

My R Journey: Thomas Mock

September 27, 2019

Thomas Mock is a Customer Success Representative at RStudio. He fell in love with R and data science through his PhD research, which he did in Neurobiology at the University of North Texas Health Science Center. Thomas is passionate about growing the R community, and founded #TidyTuesday to help newcomers and seasoned vets improve their Tidyverse skills. In his home town of Dallas, Thomas and his wife run on the local trails, play with their Boston Terrier "Howard", spend lots of time with...

An Example of How R Can Improve Your Workflow

September 20, 2019

I often tell people that R can improve their workflow. But, as everyone knows, showing is better than telling. So, in that spirit, I made a video to demonstrate one way in which R can improve your efficiency. I often work with data from the U.S. Census Bureau. My old workflow was as follows: Go to the Census Bureau website Downloading the data I need Use the data to make charts in Excel Copy these charts into Word Write my report in Word Since I switched to R, I've been able to do all 5 steps...

R is a Workflow Tool (That Also Does Some Stats)

September 16, 2019

I get asked this question a lot: is the work I do too basic to take advantage of R? It’s a reasonable question given R’s reputation as a tool for the extremely quantitatively inclined. But R can do a ton for you even if your statistical analysis needs are simple. I only ever use R for descriptive stats, and I get a ton of value from it. People new to R often don’t realize everything that it makes possible on top of data anlaysis. In particular, RMarkdown makes reproducibility the norm so that...

My R Journey: Sharla Gelfand

September 3, 2019

In choosing subjects for My R Journey interviews, I tend to stay away from statisticians. My mission with R for the Rest of Us is to demonstrate ways of using R that go beyond how many people expect R to be used (e.g. complex statistical models). But, if you know Sharla Gelfand, you know that they're not your typical statistician. Sharla is a statistician at the College of Nurses of Ontario, a freelance R and Shiny developer, and co-organizer of R-Ladies Toronto and the Greater Toronto Area R...