R Programming Tutorial for Beginners (Examples) | Learn Basics | Statistics & Data Science Course

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

00:00 Introduction
01:20 Data Manipulation in R
29:18 Creating Graphics in R
46:26 Data Analysis & Descriptive Statistics
57:03 Advanced Techniques in R

R code of this video:

vec_1 <- c(1, 1, 5, 3, 1, 5) # Create vector object
vec_1 # Print vector object

x2 = c("x", "y", "x", "x", "x", "y"),
x3 = 11:16)
data_1 # Print data frame

list_1 <- list(1:5, # Create list
vec_1,
data_1)
list_1 # Print list

class(vec_1) # Check class of vector elements

vec_2 <- c("a", "b", "a", "c") # Create character vector
vec_2 # Create character vector

class(vec_2) # Check class of vector elements

vec_3 <- factor(c("gr1", "gr1", "gr2", "gr3", "gr2")) # Create factor vector
vec_3 # Print factor vector

class(vec_3) # Check class of vector elements

vec_4 # Print updated vector

class(vec_4) # Check class of updated vector elements

data_2 <- data_1 # Create duplicate of data frame
data_2$x4 <- vec_1 # Add new column to data frame
data_2 # Print updated data frame

data_3 <- data_2[ , colnames(data_2) != "x2"] # Remove column from data frame
data_3 # Print updated data frame

data_4 <- data_3 # Create duplicate of data frame
colnames(data_4) <- c("col_A", "col_B", "col_C") # Change column names
data_4 # Print updated data frame

data_5 <- rbind(data_3, 101:103) # Add new row to data frame
data_5 # Print updated data frame

data_6 <- data_5[data_5$x1 > 3, ] # Remove rows from data frame
data_6 # Print updated data frame

x1 = letters[1:6],
x2 = letters[6:1])
data_7 # Print first data frame

y1 = 1:5,
y2 = 5:1,
y3 = 5)
data_8 # Print second data frame

data_9 <- merge(x = data_7, # Merge two data frames
y = data_8,
by = "ID",
all = TRUE)
data_9 # Print merged data frame

vec_5 <- vec_1 # Create duplicate of vector
vec_5[vec_5 == 1] <- 99 # Replace certain value in vector
vec_5 # Print updated vector

data_10 <- data_1 # Create duplicate of data frame
data_10$x2[data_10$x2 == "y"] <- "new" # Replace values in column
data_10 # Print updated data frame

getwd() # Get current working directory

setwd("C:/Users/Joach/Desktop/my directory")

getwd() # Get current working directory

...

Social Media:

Рекомендации по теме
Комментарии
Автор

A video demonstrating your devotion to learners👏👏👍👍

infotainment
Автор

Amazing organization of the key codes for someone who is starting to analyze data with R. Well done!

bobyang
Автор

What a fantastic overview. Every time I watch one of your videos I learn something new. Thank you again!

andyserowitz
Автор

It's very helpful for me
Keep it up
Make more videos for data analysis

zeeshanking
Автор

Congratulations 👏 on 10k and thanks for your all video which helps everyone 😀. Keep on doing it. I am happy so so much.

sabarikrishna
Автор

Your tutorial videos are one of the best tutorials available on YouTube . Please do more such videos . My best wishes

KisalayaMridhula
Автор

getting back to learning this beautiful language, thanks Joach for the class

pedropancine
Автор

Much thanks for the amazing explanation! I was going through your playlists but got overwhelmed and didn’t know from where to begin. This video is a perfect starting point for a beginner. Which playlist of your channel you would recommend following next after this video?

aishiaratrika
Автор

Another very nice presentation that ties a bunch of concepts together.
In regards to the multiple linear regression I have one observation or perhaps word of caution. The lines generated by the multiple regression model and those created by the lm inside ggplot are not the same. In the first case the slopes for the three lines are identical (~0.35) but in the plot they are not. This is something to keep in mind when comparing the two. Also when we generate a regression on the whole set the slope is flat and possibly negative but when we take into account species we get three lines with positive slopes. This may be an example of a 'confounder' (e.g. species) in the regression. Thanks.

haraldurkarlsson
Автор

Amazing! I can understand easily although I didn't take any statistics and programming course before.

amanullahal-maruf
Автор

R on the cleansed list of incidents, please add ‘distance’ field that has the calculated distance (in kilometres) between the coordinates (latitude and longitude) of each row and the capital’s coordinates (32.9, 13.2) by following these steps:
I need help for the question

YahyeSulieman
Автор

Congrats. Great learning here. Could you post the link to the rest of the code? It is not very easy to locate on the website.

noahmutai
Автор

can you make vidio ?how to make world graph in r studio with highlight place

shani
Автор

Hello! Thank you for your amazing videos! What code should we use if we want to add a row with one or more items that have different class than other rows and columns. Like adding character below a number

pegah-goit
Автор

Hi, thank you for the very useful video. I am having trouble entering this code in R: iris_groups <- aggregate(formula = Sepal.Length ~ Species + Sub, data = iris_groups, FUN = mean). I get the following error: argument 'x' is missing -- it has been renamed from 'formula'. I have been trying to figure it out for a long time. I would appreciate any help!

lauracocoma
Автор

Hello - another excellent video, thank you very much. I get something strange with line 75 - it fails and produces NA when I run it in Jupyter Notebook (required for my course!). Everything works just fine in RStudio,

gearoidmacamhlaoibh
Автор

Joachim,
It might be worth pointing out that there is more than one iris data set. When I execute head(iris) I get columns named Sepal.Length, Sepal.Width etc. However, I see in your printout Sepal.width (not Width). Is this caused by slightly different data sets being used?

haraldurkarlsson
Автор

Hmm, quality is not so good (only 360p). Could you make it better? Thanks

cislamaca