Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
145 views

R Programming Guide

The document promotes a live virtual training on R programming that will take place in September. It claims that anyone with basic Excel skills can learn R programming, as the concepts and skills are very similar between the two. Tables of data are a fundamental concept in both Excel and R, and working with tables, cells, columns of data translates directly from Excel to R. The training will provide hands-on labs, recordings, and support to help attendees learn R programming.

Uploaded by

JP
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
145 views

R Programming Guide

The document promotes a live virtual training on R programming that will take place in September. It claims that anyone with basic Excel skills can learn R programming, as the concepts and skills are very similar between the two. Tables of data are a fundamental concept in both Excel and R, and working with tables, cells, columns of data translates directly from Excel to R. The training will provide hands-on labs, recordings, and support to help attendees learn R programming.

Uploaded by

JP
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

R PROGRAMMING

MADE EASY
LIVE!

LINEAR
REGRESSION

YOUR EXCEL SKILLS WILL


UNLOCK ADVANCED ANALYTICS
R PROGRAMMING MADE EASY - LIVE

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.

I know. It's a bold statement.

Despite helping 1000s of professionals learn R programming over the years, I don't
expect you to take my word for it.

That's why this document exists. I like to let my content do the talking.

If you like what you see, I wanted to let you know that I'll be delivering hands-on
training with R programming in September.

Enjoy the content!

-Dave

Certificate of completion
9 hours of instruction
Hands-on labs
Limited to 20 students
PDFs of all slides/labs
All R code
1-on-1 help if needed
Recordings if you miss a class

https://bit.ly/RProgrammingLiveTraining
2
R PROGRAMMING MADE EASY - LIVE

Table of Contents

Excel Users Write Code................................4


Excel Code
R Code
Excel Skills Translate Directly to R

Excel and R Are Like Icebergs.....................7

It's All About the Tables...............................8


Tables Are Key
Tables in Excel and R
Cells of Data in Excel and R
Columns of Data in Excel and R

Throw in Some Functions...........................15


Using Functions in Excel and R
Common Functions

Awesome Data Visualizations...................18


Excel Data Visualizations
R Data Visualizations

Hands-On Live Virtual Training.................20

About the Author..........................................21

https://bit.ly/RProgrammingLiveTraining
3
R PROGRAMMING MADE EASY - LIVE

Excel Users Write Code


Excel Code

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/RProgrammingLiveTraining
4
R PROGRAMMING MADE EASY - LIVE

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/RProgrammingLiveTraining
5
R PROGRAMMING MADE EASY - LIVE

Excel Skills Directly Translate to R

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 is directly applicable to R.

This knowledge makes the learning process an exercise in mapping Excel skills to R.

LINEAR
REGRESSION

https://bit.ly/RProgrammingLiveTraining
6
R PROGRAMMING MADE EASY - LIVE

Excel and R Are Like Icebergs


While cliche, the iceberg metaphor is a powerful way to conceptualize the extent
Excel knowledge maps to R.

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

Power Query dplyr


Analysis ToolPak Linear Regression
Solver Logistic Regression

Statistical Functions Statistical Functions


DAX Market Basket Analysis
VBA Machine Learning

https://bit.ly/RProgrammingLiveTraining
7
R PROGRAMMING MADE EASY - LIVE

It's All About the Tables


Tables Are Key
IS EASY
Using Microsoft Excel is all about working with tables of data. You filter tables, you
sort tables, you pivot tables, etc. You can think of tables as one of the fundamental
objects in Excel that you create and manipulate to conduct analyses.

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/RProgrammingLiveTraining
8
R PROGRAMMING MADE EASY - LIVE

Tables in Excel and R

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/RProgrammingLiveTraining
9
R PROGRAMMING MADE EASY - LIVE

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.

[Excel Code] =AVERAGE(iris.data[Petal.Width])


[R Code] mean(iris.data$Petal.Width)

https://bit.ly/RProgrammingLiveTraining
10
R PROGRAMMING MADE EASY - LIVE

Cells of Data in Excel and R

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
R PROGRAMMING MADE EASY - LIVE

Although the R code to access/manipulate cells of data is slightly different,


conceptually it matches what Excel users do all the time.

https://bit.ly/RProgrammingMadeEasy
12
R PROGRAMMING MADE EASY - LIVE

Columns of Data in Excel and R

Excel code supports different ways of accessing columns of data within tables. Two
examples:

Providing a worksheet-based cell range


Providing object names

https://bit.ly/RProgrammingMadeEasy
13
R PROGRAMMING MADE EASY - LIVE

Once again, Excel knowledge maps directly to R code as illustrated below.

Notice how similar the actual R code is to Excel when using object names.

https://bit.ly/RProgrammingLiveTraining
14
R PROGRAMMING MADE EASY - LIVE

Throw in Some Functions


Using Functions in Excel and R

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!).

A common Excel scenario is depicted below - creating a new column of data


(IsSetosa) by invoking a function on another column of data (Species) within the
same table (iris.data).

In this utterly contrived example, Excel's mighty IF function (a commonly nested


Excel function) is being used.

https://bit.ly/RProgrammingLiveTraining
15
R PROGRAMMING MADE EASY - LIVE

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/RProgrammingLiveTraining
16
R PROGRAMMING MADE EASY - LIVE

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/RProgrammingLiveTraining
17
R PROGRAMMING MADE EASY - LIVE

Awesome Data Visualizations


Excel Data Visualizations

Excel is a great data visualization tool, supporting many ways to analyze data
visually.

https://bit.ly/RProgrammingLiveTraining
18
R PROGRAMMING MADE EASY - LIVE

R Data Visualizations

R is renowned for it's ability to create print-quality data visualizations.

R also easily produces data visualizations that are difficult, or not possible, to do with
out of the box Excel features.

Analyzing data visually is one of R's specialities.

https://bit.ly/RProgrammingLiveTraining
19
R PROGRAMMING MADE EASY - LIVE

"Dave! You are incredible! Thank you so much for being such an attentive
instructor!" - Bruce Lam

Certificate of completion
9 hours of instruction
Hands-on labs
Limited to 20 students
PDFs of all slides/labs
All R code
1-on-1 help if needed
Recordings if you miss a
class

Register by August 31st and receive a bonus valued at $249!

Day 1 Day 2 Day 3


Sept 26th Sept 27th Sept 28th

You will learn: You will learn: You will learn:


Similarities of Excel & R R stats functions The mighty dplyr
R objects (e.g., tables) The summary function Hands-on Lab #3
Math with vectors R table functions Data viz with ggplot2
Filtering R tables The aggregate function Hands-on Lab #4
Hands-on lab #1 Hands-on lab #2 Additional resources

Ready to unleash the power of R with your data? Learn more at the link below.

https://bit.ly/RProgrammingLiveTraining
20
R PROGRAMMING MADE EASY - LIVE

About the Author

My name is Dave Langer and I am the founder of Dave on


Data.

I'm a hands-on analytics professional, having used my skills


with Excel, SQL, and R to craft insights, advise leaders, and
shape company strategy.

I'm also a skilled educator, having trained 100s of working


professionals in a live classroom setting and 1000s more via
my online courses and tutorials.

In the past, I’ve held analytics leaderships roles at


Schedulicity, Data Science Dojo, and Microsoft.

Drop me an email if you have any questions:


dave@daveondata.com

https://bit.ly/RProgrammingLiveTraining
21

You might also like