Data Analysis with R
3.4 (20 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,102 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Data Analysis with R to your Wishlist.

Add to Wishlist

Data Analysis with R

Learn data analytics in easy to follow stages for beginners
3.4 (20 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,102 students enrolled
Last updated 12/2013
Current price: $10 Original price: $75 Discount: 87% off
1 day left at this price!
30-Day Money-Back Guarantee
  • 5 hours on-demand video
  • 2 Articles
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?
What Will I Learn?
Data Science project at the end of the course
Learn programming concepts
Conduct your independent data analysis
Learn by examples
Assignments after each section
Have fun by doing all above
Introduction to data science and analytics
View Curriculum
  • Internet connection
  • Computer with Mac, Windows or Linux
  • Desire to master data analysis

Data analysis becomes essential part of every day life. After this course, you will be able to conduct data analysis task yourself. Gain insights from the data.

Will be using R - widely used tool for data analysis and visualization.

Data Science project will be core course component - will be working on it after mastering all necessary background. Doing data analysis from ground up to final insights.

Starting from very basics we will move to various input and output methods. Yet another important concept - visualization capabilities. After the course you will be able to produce convincing graphs.

Background behind functional programming will be presented - including building your own functions.

After finishing the course you will feel much more comfortable programming in other languages as well. This is because R being fully empowered programming language itself. Main programming concepts presented:

  • Various data types
  • Conditional statements
  • For and While loops

No previous programming knowledge required.

Finally, data mining and data science techniques in R delivered in clear fashion together with assignments to make sure you understand topics. Main statistical capabilities behind data science covered.

Course is interactive. Specific topic covered in each lecture. Each lecture includes multiple examples. All material covered in videos are available for download! This way student is able to program himself - break things and fix them.

Students will finish course in approximately 7-10 days working 3 hours per day. Time spent working individually included.

After each section assignment should be completed to make sure you understand material in the section. After you are ready with the solution - watch video explaining concepts behind assignment.

I will be ready to give you a hand by answering your questions.

Finally, this course is specifically designed to get up to speed fast. Biggest emphasis put on real examples and programming yourself. This distinguishes this course from other material available online - usual courses includes vague slides and long textbooks with no real practise.

Who is the target audience?
  • Beginners data analysts
  • Students
  • Users of other analysis tools
  • Those who loves data
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 44 Lectures Collapse All 44 Lectures 05:14:40
2 Lectures 09:18

Course logistics will be covered in this lecture.

Main take away - this course is designed to be as interactive as possible. The goal is programming and doing analysis yourself with help of videos and questions. I will be more than happy to help you by answering them : )

Preview 03:05

Two programs should be installed to start working:

  1. R . R package itself.
  2. Rstudio . Graphical user interface. Most popular R code editor. This will make developing code more easy and straightforward.

Actually, everything could be done without Rstudio(only with R itself), but I highly recommend to install it as well. Some code examples and assignments will include usage of Rstudio.

Now we are ready to start learning data analysis with R : )

Preview 06:13
Getting feet wet
5 Lectures 43:13

Lecture demonstrates how to handle directories to easy work and improve code readability.

  1. Get current working directory
  2. Set working directory yourself
  3. Example - reading file

Download source code and make it run on your computer by chaning directory names accordingly. Post questions if stuck : ) Good luck!

Preview 13:00

Ways to find help within R itself. Also some valuable internet resources:

Getting help

This lecture lays down ground for further studies regarding basic R commands.
  1. Variable creation
  2. Notes on naming variables
  3. Mathematical symbols
Preview 07:30

Lecture will revice functions we are already familiar with. Also couple of new ones will be introduced.
  1. List variables available in memory
  2. Directories again - revision : )
  3. Text manipulation
  4. Built in variable editor
Be sure to download supplementary material and run the code yourself.
Preview 10:26

First assignment!

Download supplementary material, unrar folder. Firstly finish assignment itself. When done - check results or questions in answers script.

Lastly, let me know how are you going : )

Preview 07:18
Data types
7 Lectures 01:13:15

Most used R data type is numeric. For this reason we are starting with numeric data type first.

Sometimes issues with vectors versus simple numbers might arise. But remember - simple numbers are also vectors of length one! Thus treat all numeric variables same way - vectors of different length.

Very important aspect is vectorization - exploit vectorized operations.


Characters are text variables. Every character variable is also vector of some length.

However, there are different functions to work with characters compared to numeric variables.


Logical variables are also vectors of some length. Values are either TRUE or FALSE.

Note that TRUE/FALSE could be encoded as T/F or even 1/0. Feel free to use either of these, because they are equivalent.

Similarly to other programming languages logical operations are available with logical variables - AND, OR, !(negation). After understanding these in one programming language you will be able to use them in others as well : )


First assignment in this section. Feel free to go back to previous lectures if need quick reminder of some topics : )

Assignment 1

Very important data type in R. Think of it as spreadsheets. Multiple rows with information in columns. Each column can be of different type.

Pay attention to how data frame is constructed from vector variables. Each column can be of different data type. Compare it with vectors, where each element must be of same type.

Data frame

List are similar to data frames.

However, lists are more flexible data type compared to data frames. But flexibility comes with its price also. Usually lists are harder to manipulate.


In second assignment data frames with lists are covered. Also combining numeric and character vectors.

You might wish to stop here and spend some more time practicing. Very important to understand data types well - this is main block of language. They will be used in all further sections : )

Assignment 2
External Data
4 Lectures 32:42

Package is simply bunch of functions designed by professionals to perform specific tasks.

R has > 5000 packages available for free. Whatever issue you will have - most likely there will be package to solve it : )

R packages

Multiple data importing options available. However, in this video we will cover mostly used ones:

  1. Text
  2. Previously saved variables in .Rdata files
  3. Excel
  4. "datasets" package

If data could be imported, it can be exported as well.

By doing data analysis you will most likely need to save some output. Data export methods covered in this lecture includes:

  1. Text
  1. .Rdata files
  2. Excel

Here we will combine import, some manipulation and export together. This is common workflow for data analysis.

In latter lectures we will learn more advanced manipulation techniques : )

Control structures
4 Lectures 30:07

Very often some logical conditions should be checked before deciding which actions should be taken.

If-else statement usually looks like:

if (condition 1) {

Insert code to execute

} else if (condition 2) {

If condition 1 is not satisfied and condition 2 is - execute this part of code

} else {

If none of condition 1 or condition 2 are satisfied - execute this part of code



While loop is used when we need to perform specific code as much times as given condition is satisfied. Stop executing code once condition is not satisfied.

While structure looks like:

while (condition) {

# Code to be executed


Make sure condition will be satisfied finally to avoid infinite loop : )


For loop is used when we have bunch of elements and would like to perform some code with each of them. For example run through list elements and print particular element of it.

Note that If-Else or while statements could be used inside For loop. Opposite holds true as well.

Structure of for loop:

for (index in set_of_elements) {

# Perform some manipulation with "index"



Checking your knowledge about if's, while and for loops.

Be sure to try creating combinations of these. Any control within each other. Try combining them to accomplish some goal - try to think about something(even not very realistic in real world). Most important to understand logic and syntax for this section.

4 Lectures 28:55

Function is chunk of code to perform specific task. You provide multiple arguments to function and get the result back. Results are returned using return(results) statement. For example:

FunctionName = function(argument1, argument2) {

# Code performing some manipulation

return("include results here")


Once function is sourced, variable of type function will be created and you will be able to call it with necessary arguments.

First functions

Usually functions are more complicated. This lecture demonstrates just that.

Combining functions with while/for loops and if's is very good exercise!

More complex functions

R is functional programming language. So functions is very often used for almost all jobs you need to do.

Either you can use built in functions(like mean(), read.csv()) or packages(XLConnect for example) or even write your own functions.

Experiment with functions. Try to call one function from another function. Think about ways to exploit functions for your needs : )

Assignment 1

More practice never hurts!

Assignment 2
3 Lectures 30:12

In this section basic graphics will be learnt. Starting with line and scatter charts.

We will be using "base" R graphical engine. However, there are more graphical packages available:

However, these packages are more advanced and takes some time to learn them. Firstly, make sure you are comfortable comfortable with "base" graphs and then try other capabilities as well.

Line, Scatter charts

Bar, Pie charts covered here. More manipulation options added. Note that usually same arguments for manipulating plots are used in all chart types - Bar, Pie, Line, Scatter.

Bar, Pie charts. Graph export

Best way to learn graphics is to firstly have a problem and then figuring out how to plot results.

After completing assignment think about data you want to visualize for some time yourself and do it right now!

This will require a lot of topics covered in this course - acquiring data, importing it, manipulating, plotting.

Additional data types
3 Lectures 13:09

Named vectors are just simple vectors, but with added names to it. Same calculations applies as to simple vectors.

You can convert named vector to simple vector and back at any time.

Named Vectors

Matrices is similar to data frames, because both have 2 dimensions. However, all columns should be of the same type in matrices.

Assignment of names to rows and columns possible.

Mathematical calculations might be performed. See for more.


Dates and times are crucial component when dealing with data generated during time.

A lot of date/time formats exists in computer science. They might be tricky to use at first. Only practice helps here : )

Dates and Times
Data mining
7 Lectures 41:54

Using R famous apply() function for data frames. This function summarizes data frame by rows or columns.

Possibility to use custom(your own) functions together with apply().

Some additional reading -

Summarize - Data frames

Similary to apply for data frames, lapply or sapply used for lists.

Here we don't have rows/columns parameter. lapply/sapply runs through all elements of the list applying your provided function.

lapply will always output list, while sapply will try to simplify results to vector or matrix.

Summarize - Lists

Time to complete assignment for both apply and lapply/sapply.

Cheers! : )

Assignment 1

Super useful package reshape2 written by Hadley Wickham - thanks to him.

This allows to structure any given data frame in totally new form of data frame suitable to your needs.

Don't forget to check out for some good examples.

Reshape data - reshape2 package

Good time to reshape data yourself!

Assignment 2

Yet another useful package from Hadley Wickham.

Package allows to take one data format(list, data frame, matrix), slice depending on selected columns and finally combine result back to new format(list, data frame, matrix).

Reshape data - plyr package

Check your knowledge about plyr package. Let me know if any questions arises.

Assignment 3
Data Science Project
2 Lectures 02:11

In this section you will conduct data science project yourself!

Find your own data or use suggested one - check next lecture. No strict guides how to do this task, but there are some suggestions available in next lecture if needed.

Don't be afraid to experiment. Raise hypothesis questioning it with your data.

Finally let me know how you are doing and feel free to share your work. I would love to check it out : )


Data Science workflow

Possible project description. Feel free to adjust it if needed to meet your needs.

Possible project suggestion(data included)
2 pages
2 More Sections
About the Instructor
Mangirdas Adomaitis
3.3 Average rating
28 Reviews
1,487 Students
2 Courses
Data analyst, Online Advertising specialist

Data analyst with more than 3 years of experience.

Employing various tools for data analysis. Always picking the right tool to do the job. I use R package often combining it with Excel, SQL databases and Access on daily basis.

Graduated econometrics from Vilnius University faculty of Mathematics and Informatics. Afterwards I worked as economical forecaster. Currently my position being analyst of online advertising data in leading advertising platform - focusing on insights from large datasets.

I am constantly participating in events/conferences regarding data analysis. Currently interested in open data initiatives - possibilities to open up more government data for public use. Participating in contests of predictive analytics.

Let me know if you have any questions/suggestions regarding data and analysis. You can find my on Google+ or Linkedin.