Why R Programming Is Easy
Why R Programming Is Easy
R PROGRAMMING
IS EASY
LINEAR
REGRESSION
Introduction
If you have Microsoft Excel skills I can teach you how to use R programming to analyze your
business data. Doesn't matter if you've never coded before. Your basic skills with Excel tables,
formulas, and pivot tables makes this possible.
First, don't take it from me. Here's some feedback from one of my students:
"I completed David Langer's course, R Programming Made Easy. As a decision support
analyst, I have a burning desire to solve more problems and not let the data scientists have
all the fun. My first step on that path is familiarizing myself with one of the primary languages
used in data science, R.
LINEAR
Dave's enthusiasm for data digging and problem-solving shine through in the videos.When I
ran one section of code and looked at the results, I shouted, 'Whoa!' because of the
REGRESSION
implications.
So if you want to quickly get up to speed on the basics of R, I recommend Dave's 'R
Programming Made Easy'. I will definitely be signing up for his future offerings."
- Ray Givler
Second, my philosophy is to let my content do the talking - which is why this document exists.
If you're interested in learning more, you can check out free lesson video previews via the link at
the bottom of this page.
Additionally, if the online course is right for you, use the coupon LINKEDIN at checkout to save
an additional 20% off the purchase price.
-Dave
https://bit.ly/RProgrammingMadeEasy
2
WHY R PROGRAMMING IS EASY
Table of Contents
https://bit.ly/RProgrammingMadeEasy
3
WHY R PROGRAMMING IS EASY
While most Excel users don't think of it this way, they spend a lot of time writing and
debugging code in Excel. In fact, Microsoft Excel is by far and away the world's most
popular programming environment.
Take the image below as an example. The user is using Excel's AVERAGE function to
calculate the average of a column (i.e., Petal.Width) of a table (i.e., iris_data) in a
worksheet.
LINEAR
Once the user hits the <enter> key, Excel attempts to interpret the instructions in the
cell and perform the desired operation. If Excel doesn't understand what the user
REGRESSION
typed, it reports an error.
That's coding!
https://bit.ly/RProgrammingMadeEasy
4
WHY R PROGRAMMING IS EASY
R Code
While it isn't the only way to code in Excel, calling Excel functions as depicted on the
previous page is by far the most common. When using Excel in this way, Excel is
operating as a code interpreter.
Using R as an interpreter is very common. The R user types some code and hits the
<enter> key. R then tries to interpret the code, throwing an error if doesn't
understand what was typed by the user.
In this way Excel and R are very similar, but it doesn't stop there. Even the code is
very similar!
LINEAR
The image below depicts the same scenario as on the previous page, but using R
instead. REGRESSION
As depicted, the user is calculating the average (mean is just another name
for the average) of the Petal.Width column of the iris_data table.
https://bit.ly/RProgrammingMadeEasy
5
WHY R PROGRAMMING IS EASY
While this example might seem simple, it demonstrates why R is the fastest, easiest
way for ANY team to unlock advanced analytics.
As you will see through the rest of this document, Excel is a powerful analytical tool
with many concepts and skills that need to be mastered to use Excel effectively.
This knowledge makes the learning process an exercise in mapping Excel skills to R.
LINEAR
REGRESSION
https://bit.ly/RProgrammingMadeEasy
6
WHY R PROGRAMMING IS EASY
As depicted below, Excel features above the water line (e.g., Pivot Tables) only
scratch the surface of Excel's capabilities. However, these feature represent the bulk
of Excel's use in practice.
Another similarity between Excel and R is the "choose your own adventure" aspect
of the technologies. Just as many Excel users never learn Power Query, not every R
user needs to learn statistical analysis to be effective in their work.
LINEAR
REGRESSION
Tables Data Frames
Common Functions Common Functions
Pivot Tables dplyr
Charts ggplot2
https://bit.ly/RProgrammingMadeEasy
7
WHY R PROGRAMMING IS EASY
Excel tables can also be thought of as container objects. Tables contain rows, columns,
cells, data formats, etc.
You probably can see where I'm going with this already.
LINEAR
When analyzing data with R, it's all about the tables - just like Excel.
REGRESSION
Once again, your Excel knowledge directly translates to R.
https://bit.ly/RProgrammingMadeEasy
8
WHY R PROGRAMMING IS EASY
The image below demonstrates how Excel tables are objects. For example, every
table in Excel has a name - whether you explicitly name a table or not. Table names
allow you to directly access/manipulate tables using Excel code.
https://bit.ly/RProgrammingMadeEasy
9
WHY R PROGRAMMING IS EASY
Things work in R exactly the same way. Tables of data in R (known as "data frames")
have names just like Excel tables so that you can write R code to access/manipulate
tables of data.
https://bit.ly/RProgrammingMadeEasy
10
WHY R PROGRAMMING IS EASY
Working with cells of data is very common in Excel. It is useful to think of cells as
objects contained within tables - as depicted below. Once again, you use Excel code
to access cells.
https://bit.ly/RProgrammingMadeEasy
11
WHY R PROGRAMMING IS EASY
https://bit.ly/RProgrammingMadeEasy
12
WHY R PROGRAMMING IS EASY
Excel code supports different ways of accessing columns of data within tables. Two
examples:
https://bit.ly/RProgrammingMadeEasy
13
WHY R PROGRAMMING IS EASY
Notice how similar the actual R code is to Excel when using object names.
https://bit.ly/RProgrammingMadeEasy
14
WHY R PROGRAMMING IS EASY
The bulk of code Excel users write call functions. Often, these function calls are nested
and can be difficult to debug (again, that's coding!).
https://bit.ly/RProgrammingMadeEasy
15
WHY R PROGRAMMING IS EASY
The contrived example from the previous page is repeated using R code.
A IsSetosa column is being added to the iris.data table (or data frame) and populated
with new data derived from the existing Species column.
First, notice how the workflow is exactly the same as in Excel - only everything is
done in code with R.
Second, notice how similar the R ifelse function call is to Excel code.
https://bit.ly/RProgrammingMadeEasy
16
WHY R PROGRAMMING IS EASY
Common Functions
Like Excel, R comes out of the box with many, many functions to work with columns
of data.
Many of the R functions share the same name with the corresponding Excel
function. In other cases, mapping your Excel knowledge to R is straightforward, as
depicted below.
https://bit.ly/RProgrammingMadeEasy
17
WHY R PROGRAMMING IS EASY
Excel is a great data visualization tool, supporting many ways to analyze data
visually.
https://bit.ly/RProgrammingMadeEasy
18
WHY R PROGRAMMING IS EASY
R Data Visualizations
R also easily produces data visualizations that are difficult, or not possible, to do with
out of the box Excel features.
https://bit.ly/RProgrammingMadeEasy
19
WHY R PROGRAMMING IS EASY
Over the years I've helped 1000s of professionals gain skills in R and machine learning. So
you can believe me when I say this - you've got this if you want it.
I have a passion for teaching and I want all of my students to be successful in applying
what they learn from my live and online classes in their daily work.
I actively encourage my students to ask any and all questions via the online course
platform. I obsessively monitor inbound student questions and answer them promptly.
Many of my students also find it beneficial to augment courses with dedicated 1-on-1
coaching. I help my coaching clients to successfully apply what they have learned in their
work - their business problems and their data.
If you're interested in learning more about coaching, you can find more information using
the link below.
If you decide that my R Programming Made Easy self-paced online course is right for you,
be sure to use coupon LINKEDIN at checkout to save an additional 20% off the purchase
price.
https://bit.ly/RProgrammingMadeEasy
20
WHY R PROGRAMMING IS EASY
https://bit.ly/RProgrammingMadeEasy
21