R Programming Tutorial

preview_player
Показать описание

MY UDEMY COURSES ARE 87.5% OFF TIL January 16th ($9.99) One is FREE

In this one tutorial I will cover the basic syntax of the R programming language as well as provide numerous examples on plotting and statistical analysis. R is widely considered to be the best language for statistical analysis and data mining. R makes it extremely easy to perform numerous complex calculations with ease and its plotting system is second to none.

00:40 Installation
02:14 R Studio Setup
04:12 Fun Example
09:57 Assignment
10:22 Variables
10:37 Data Types
13:33 Arithmetic Operators
14:59 Vectors
20:17 Relational Operators
22:15 Logical Operators
23:00 If
24:04 Switch
25:34 Strings
29:45 Factors
32:15 Data Frames
36:00 Repeat
36:43 While
37:54 For
38:43 Matrices
43:03 Arrays
44:22 Functions
48:44 Anonymous Functions
49:29 Closures
51:30 Exception Handling
53:11 File I/O
58:29 Plotting
1:08:14 Math Functions
1:11:18 Random Numbers
1:12:18 Pie Charts
1:17:56 Bar Charts
1:20:12 Regression Analysis

Like the channel? Consider becoming a Patreon! Check it out here:

*Watch More Learn in One Videos*
Рекомендации по теме
Комментарии
Автор

Learn in One Videos for Every Programming Language

derekbanas
Автор

Hey +Derek Banas! I'm brazilian and here in my country there are 13 million people looking for jobs right now (we're in a recession). I've been studing html5/css/javascript/phyton and your content is helping me to find a new carrer. Thank you!

danielhcp
Автор

00:40 Installation 02:14 R Studio Setup 04:12 Fun Example 09:57 Assignment 10:22 Variables 10:37 Data Types 13:33 Arithmetic Operators 14:59 Vectors 20:17 Relational Operators 22:15 Logical Operators 23:00 If 24:04 Switch 25:34 Strings 29:45 Factors 32:15 Data Frames 36:00 Repeat 36:43 While 37:54 For 38:43 Matrices 43:03 Arrays 44:22 Functions 48:44 Anonymous Functions 49:29 Closures 51:30 Exception Handling 53:11 File I/O 58:29 Plotting 1:08:14 Math Functions 1:11:18 Random Numbers 1:12:18 Pie Charts 1:17:56 Bar Charts 1:20:12 Regression Analysis

mahmudwasifnafee
Автор

# Solving a 5 x 5 system of random linear equations in R

library(matlib) # Linear Algebra library just for ShowEqn() function

# This matrix is random: selecting 25 elements in a 5 x 5 matrix from
# from numbers anywhere between 1 and 100

A = matrix(data = sample(x = 100, size = 25), nrow = 5, ncol = 5)
print(A) # Overall structure looks like this
[, 1] [, 2] [, 3] [, 4] [, 5]
[1, ] 83 40 89 62 50
[2, ] 96 32 91 28 47
[3, ] 48 95 77 43 52
[4, ] 12 35 29 87 4
[5, ] 27 59 37 45 71

# An array of 5 numbers randomly sampled the same way.
b = sample(x = 100, size = 5)
print(b)
[1] 72 42 94 78 38

showEqn(A, b) # Shows you what the equations look this
83*x1 + 40*x2 + 89*x3 + 62*x4 + 50*x5 = 72
96*x1 + 32*x2 + 91*x3 + 28*x4 + 47*x5 = 42
48*x1 + 95*x2 + 77*x3 + 43*x4 + 52*x5 = 94
12*x1 + 35*x2 + 29*x3 + 87*x4 + 4*x5 = 78
27*x1 + 59*x2 + 37*x3 + 45*x4 + 71*x5 = 38

solve(A, b)
[1] -1.62721725 -0.01064206 2.17472210
[4] 0.41098711 -0.23093508

# Subscript notation: x_1 = x<sub>1</sub>
# Thus x_1 = -1.62721725, x_2 = -0.01064206, x_3 = 2.17472210, x_4 = 0.41098711, x_5 = -0.23093508

Because of the method that solve() function uses, matrix A must be invertible, or in other words, the determinant be zero for the function to work. Usually, that's not a problem.

R can solve much larger linear equations in a breeze as well.

Reivivus
Автор

Thanks for the video. You actually have a mistake in the beginning using the baseball data. There actually is an error, but it's not displayed to you for some reason.
The text file has a name with an apostrophe, and several more names with a middle name, which causes the number of rows to not match the number of columns.
So, essentially what you're seeing is the first 200 or so names plotted, and you have 300 names missing.
After you fix the errors and import the file correctly, you will see the graph (fittingly) looks in the shape of "r" :)
You can check this by checking the shape of your dataframe.

SuperIdo
Автор

Is there anything you don't know??

todo
Автор

DEREK!!! How do you do it?? are you stalking me? When I was doing my undergrad in computer science I had to learn a few programming languages by myself. Each time I got told to learn one you would magically bring a video you on that language the next week, thsi happend 3 times!! I graduated got my CS Degree :) (Not bad for someone who never finished high school or college) and decided to do a Master Degree in Machine Learning/Data Science I started in the beginning of October, You now release a video on R which is for data analysis and is heavily used in ML. Glad your back :) Thanks Dude!!!

definty
Автор

Whenever I want to learn something related to programming languages, always found your videos content wise and quality wise so much useful and remarkable. I'm covering the game tutorials, made space invaders, it was an remarkable project. I was searching that what is data mining and started to think will Derek Banas made video on Data Mining after Making Legend of Zelda. And yet this thinking has become an 1:23:31all based on R programming language. I'm really thankful to you for making this video. Thank you :)

a.b_shots
Автор

Your style of showing the syntax is helpful to me. Thank you

gabe
Автор

Hey Derek, thanks for the great video.I'd be happy to see more about statistics, different regression models etc. Thanks again.

colebq
Автор

Thanks. I love the way you are teaching. Where do i download the mlbplayer sample data for the fun example you give in the beginning

elainedu
Автор

Such an amazing tutorial. So simple and easy to understand! Thanks a lot man

pranayvenkatesh
Автор

Right on time! As i started learning it !

hamzaaitboutou
Автор

Hi Derek,

Glad that i found your youtube channel and found it to be very useful for my Data Science Studies. Would be very grateful to you if you could put up some videos on ML algorithms (which are most commonly used & most popular ones) along with some practical examples.

MadhuKumarKilli
Автор

Hey Derek! I am just so so amazed by the knowledge that you just shared. You are so generous! Thank you would be a very small word. Bless you with everything you will require for your amazing mind and soul. I am so excited to add R programming to my resume. I love the language and the concept. Thank you for all the knowledge.

laasyakrupa
Автор

Pls also make "How to learn tableau in 1 video" asap.

Great work..

so much. Iam starter into software world.

Thnx fr such a warm welcome sir

hanumanthuu
Автор

Very well presented. Thanks for taking the time to do this video.

iantorhys
Автор

Derek, thanks for this great content! Blessings

josemunguia
Автор

Hello Derek, your video classes are awesome. Since I learnt a lot of C# with you, would you mind to make tutorials of ASP.NET Web Pages, MVC, Web Forms and API if you have time for it. Thank you so much and appreciate your work.

Felm
Автор

Perfect timing! Huge thanks and even bigger respect, Derek! :)

dbarnie