Where R beats Excel

-Provide a trail of your work
-Easier for someone else to review
-Ease of repeatability
-Easier to find your mistakes and correct
-No messy directory full of workbooks
-Can pull in data from APIs, servers, SPSS files, and many other formats
-Can do web scraping
-Make web pages from your analysis
-Connect RStudio to Github for version control
-More robust for statistical analyses
-Summarizing data. More versatile than Pivot Tables.
-Easier to create new columns (even ones that don’t get stored in your table)
-More versatile for data cleaning
-You can do mapping!
-Open source: many users constantly making it better

The cons of R

-Higher learning curve
-No point and click. Lots of typing
-Charts are harder to make (but so many more options!)
-More time needed on front-end of analysis
-Harder to do on deadline until you get proficient
-There are almost too many packages, many doing the same things!
-Package and function naming can be confusing. As just one example: To import data we used a readr function called “read_csv”. But Base R has an import function called “read.csv”. They behave quite differently.
-The “how to” information that comes with the packages is minimal and oftentimes confusing. However, I’ve found better guidance on blogs and other websites.

How to get started

-Take a starter class, but then do most of your learning on an as-needed basis.
-For first analysis, use a simple dataset you’re already familiar with
-or find an analysis you’ve done in the past and recreate it in R
-Download R and RStudio.
-R is made up of Base R, the underlying coding language, but the real power comes from the thousands of packages (or libraries) that enable you to do so many more things. All packages are available on the Comprehensive R Archive Network (CRAN).

Classes, tutorials, resources

-NICAR conference sessions!
-Andrew Tran’s online class
-Datacamp
-Excel vs R: A Brief Introduction to R
-Storybench is compiling lots of useful tutorials and tips for working in R.
-How Do I?… A searchable index of tasks and tips collected by data journalist Sharon Machlis. Also check out her book, Practice R for Mass Communication and Journalism.
-Peter Aldous’ Data Analysis with R training materials. This site really opened the door for me. It focuses on the SQL-like capabilities of the dplyr package and using ggplot2 for visualizations and uses real journalism examples.
-Ron Campbell’s Intro to R hands-on class from NICAR18. This one is a little more advanced and uses more Base R than the others.
-Beginner’s guide to R, by Sharon Machlis. This covers a lot of basic ground and provides a ton of useful links
-This tutorial from NICAR18 by Caelinn Barr covers how to scrape data from a website and some other slightly more advanced concepts.
-.Rddj, resources for doing data journalism with R.