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

Setting Up Projects and Importing Data in R

August 23, 2019

I got an email the other day from someone who is interested in learning R, but has been scared off by what others have told her about it. Now, learning R is not "basically impossible," of course (if it were, no one would use it, which is most definitely not the case). But this person's email gets at something that more experienced users forget: the learning curve for R is steep. I was also reminded of this in an email exchange with Ann, another new R user. She wrote: "I wish there was a step...

Themes to Improve Your ggplot Figures

August 12, 2019

The default look and feel of figures made with ggplot leaves something to be desired. See that default gray background and you know the figure was made in ggplot, just as a 3D pie chart could only mean Excel. Fortunately, though, changing how your ggplot figures look is incredibly simple. In fact, it's usually just one line of code (and the range of things you can do with one line of code in R never ceases to amaze me). Simply add theme_minimal() to turn the above plot into this: If you find...

My R Journey: Adrienne Zell

August 7, 2019

Adrienne Zell wears many hats. She is an Assistant Professor in the Oregon Health and Science University (OHSU) – Portland State University (PSU) School of Public Health. She is also the Director and co-founder of the OHSU Evaluation Core, an Assistant Director for the Oregon Clinical and Translational Research Institute (OCTRI), and the Director of the OCTRI Office of Research Impact at OHSU. Adrienne’s team provides evaluation support and technical assistance to academic and community-based...

If You Care About Equity, Use R

July 29, 2019

If you care about issues of equity and you work with data, you should use R. Yes, a humble data analysis tool can play a small, if important, role in creating a more equitable society. The first way that you may connect R and equity is with who uses it. Proprietary software like SPSS, SAS, Stata, and the like can cost thousands of dollars, making them inaccessible for many living outside of the wealthiest countries. R is famously free. If you have a computer you can use it. Efforts like...

Using R to Automate Survey Administration

July 8, 2019

Do you conduct surveys? If so, you likely know the pain of having to continually remind people to complete your survey? What if you could automate this process so that you don't have to keep track of anything? In this video tutorial, I give an example of how you can use R to automate survey administration. People typically think of R as a tool for data analysis, which it of course is. But, with thousands and thousands of package that give R added functionalities, you can use several of them...

A short overview of the grammar of graphics

July 1, 2019

One of the things I've had most trouble explaining to folks learning R is the grammar of graphics. It's the theoretical underpinnings of the ggplot2 package, which is used to make all sorts of graphics. In general, I try to avoid being too theoretical in my courses and workshops, but the grammar of graphics is so key that you can't learn ggplot without understanding it. In putting together my Fundamentals of R course, I made this video to help my students learn the grammar of graphics. I hope...

My R Journey: Alex Michel

June 25, 2019

Alex Michel recently graduated from the OHSU-PSU School of Public Health in Portland, Oregon with a Master of Public Health. She’s worked in science communication and science writing for about 10 years and hopes to continue to use R to improve public access and engagement with research.Why did you decide to learn R? I first really got interested in R when I saw a guy who was making these really great graphs that also used these hilarious color palettes inspired by the nineties X-Men cartoon...

A Guide to R for Excel Users

June 18, 2019

Many of the clients I work with are coming from Excel. When I teach them R, I try to relate new information to things they are already familiar with. In that spirit, I've put together a short video that shows some key functions (select, mutate, filter, summarize, group_by, and arrange) from the dplyr package in R. If you've ever wondered, say, what the equivalent of the filter function would be in Excel, I've got you covered! A rendered version of the RMarkdown document used in the video is...

How teaching second graders helps me teach R

June 10, 2019

From 2005 to 2007, I was a second grade teacher at Bel Pre Elementary School in Silver Spring, Maryland. It was the hardest job I've ever done. But I learned so much about teaching during that time (as well as my education master's program) that it was anything but a waste. Recently, I've been reflecting on ways that I'm incorporating lessons learned from my time working with young students into how I've designed my Fundamentals of R course for (slightly) older students.Lesson #1: Go Slow The...