Conditional statements and loops in R

  Рет қаралды 37,210

Hefin Rhys

Hefin Rhys

Күн бұрын

Пікірлер: 45
@TimvonzumHoff
@TimvonzumHoff 4 жыл бұрын
Your videos are far more helpful than any other videos to Rstudio (including my professor's) Thanks a lot and keep up the good work!
@esan120au
@esan120au 3 жыл бұрын
Thanks a lot Hefin. Please upload higher quality videos, so that people can see your codes better. Thanks again
@lexparsimoniae2107
@lexparsimoniae2107 4 жыл бұрын
Fantastic video! You have included so much material in a brief video without losing clarity. Thank you.
@federicogarland272
@federicogarland272 2 жыл бұрын
Thank you so much, I've watched almost all your videos and am now able to use R for useful data processing tasks in my work field which is agriculture. You're great at explaining, cheers!
@koterm
@koterm 4 жыл бұрын
You R a great teacher! Thank you for your videos!
@johnmandrake8829
@johnmandrake8829 4 жыл бұрын
my goodness you are so good at explaining, you should contact Khan academy and they'd hire you I bet for this section
@amourlafleur1762
@amourlafleur1762 2 жыл бұрын
Thanks again my free but best professor.
@ramgouveia
@ramgouveia 3 жыл бұрын
Thank you very much. This video is very helpful for my work.
@oscararenas9696
@oscararenas9696 5 жыл бұрын
You should increase the console's size. It's kind of difficult to watch your typing
@Kaneki-sn3bf
@Kaneki-sn3bf 3 жыл бұрын
Such an amazing video!!!!!!! Excellent.
@treeflamer
@treeflamer 3 жыл бұрын
Awesome video dude very helpful!
@roky1337
@roky1337 5 жыл бұрын
Great video! You can actually hear the computer rev up at 15:00 while trying to iterate all of those "this is true"s :)
@mushroom_curry4613
@mushroom_curry4613 3 жыл бұрын
Haha! Was just going to post this. Yup you can hear a fan kick on it seems.
@009Ammu
@009Ammu 5 жыл бұрын
Awesome video !! looking forward to more of ur videos on R, My concepts are more clear. Thanks and cheers for a great video.
@johnkaruitha2527
@johnkaruitha2527 4 жыл бұрын
Great tutorial Hefin
@TheLolanita
@TheLolanita 4 жыл бұрын
Your videos are great! Very didatic! Thanks
@amourlafleur1762
@amourlafleur1762 2 жыл бұрын
please can you share a link with your statistics workshop, if possible?
@fabioramilli8863
@fabioramilli8863 5 жыл бұрын
You make it so simple! thanks a lot
@Chuquemeka
@Chuquemeka 3 жыл бұрын
Thank you Hefin.
@mohitseventeen
@mohitseventeen 3 жыл бұрын
I have a doubt, It would be great if someone explains. during 30:00 norm is a list, so mylist will have 1000 such lists so mylist is list of list. But in the video he says mylist is list of vectors.
@hefinrhys8572
@hefinrhys8572 3 жыл бұрын
I see why it seems like that, but the code does generate a list of vectors. The reason is that the rnorm function returns a vector (in this case of length 10). When I wrap the rnorm function inside the list function, I get a list with 1 element, which is my vector. I then use the c function to concatenate this length 1 list, with the existing my list object. Does that make sense? I had to store my vector inside a list (of length 1), in order to add it as a new element to my list.
@mohitseventeen
@mohitseventeen 3 жыл бұрын
@@hefinrhys8572 Yes, Thank you :)
@siffo10
@siffo10 6 жыл бұрын
Good video, maybe change your theme as it makes code in source hard to read
@jiakedjzhou1899
@jiakedjzhou1899 5 жыл бұрын
Great video. Thank you for making it
@vincentxu612
@vincentxu612 4 жыл бұрын
Thanks for this awesome tutorial! I have one question about the example in row 52-58 that combines IF and FOR. What code should I use if I want to print both char and int in one statement (similar to the paste function in row 15)? For example instead of printing just "i is even" when i = 2, it will show "i is even, and the value is: 2". Thanks again!
@bedikilci9113
@bedikilci9113 3 жыл бұрын
Hello, Im new to this data thing and if i understand your question right... for(i in 1:5){ if(i %% 2==0){ print("i is even", show(i)) }else { print("i is odd", show(i)) } } I hope its what you are asking for...
@louisismael5887
@louisismael5887 3 жыл бұрын
i dont mean to be off topic but does someone know a trick to get back into an Instagram account? I was dumb forgot my password. I would love any help you can offer me.
@hudsonmarcus8880
@hudsonmarcus8880 3 жыл бұрын
@Louis Ismael Instablaster ;)
@louisismael5887
@louisismael5887 3 жыл бұрын
@Hudson Marcus Thanks for your reply. I found the site thru google and Im waiting for the hacking stuff atm. Looks like it's gonna take a while so I will get back to you later when my account password hopefully is recovered.
@louisismael5887
@louisismael5887 3 жыл бұрын
@Hudson Marcus It did the trick and I now got access to my account again. Im so happy! Thanks so much you saved my ass !
@emilyr2582
@emilyr2582 4 жыл бұрын
In regards to the end bit about using apply() on specific columns to produce a mean with the iris data, how would you incorporate in the code finding a mean of each column by species and print it? So mean of columns for setosa, virginica, etc. Thanks!
@hefinrhys8572
@hefinrhys8572 4 жыл бұрын
Hi Emily, the easiest way is probably using the dplyr package (check out my video on dplyr for more detail). This is how you could do this:
@hefinrhys8572
@hefinrhys8572 4 жыл бұрын
library(dplyr) group_by(iris, Species) %>% summarise_all(mean)
@poojamahesh8594
@poojamahesh8594 3 жыл бұрын
very nice explaination i have a dataset containing time variable, I must categorize them into morning, noon,eve,night using..please tell me how I can do it
@firdaussaleh5519
@firdaussaleh5519 2 жыл бұрын
How apply conditional vlookup in r program?
@babatundeolapeju1407
@babatundeolapeju1407 5 жыл бұрын
Hello, What an educative video, bravo!! I ran this code: if(a
@babatundeolapeju1407
@babatundeolapeju1407 5 жыл бұрын
corrected! I used PRINT instead of PASTE. Thanks.
@milindsharma2579
@milindsharma2579 3 жыл бұрын
Can You help me with one question I have been unable to solve? Question - Check each value of vector V passed as arguement.If the marks are greater than or equal to 80 print Above_average, if marks are less than 80 print average ( in a single line) Your help will be very much appreciated.
@TEBAKBENDA
@TEBAKBENDA Жыл бұрын
attend to learn
@darasuman2624
@darasuman2624 6 жыл бұрын
its not visible...
@hefinrhys8572
@hefinrhys8572 6 жыл бұрын
Hi Suman! Are you sure you're viewing the video in HD? Click on the gear in the lower right corner of the video, click Quality, and set it to 1080p. You can also view the video in Cinema or Full Screen mode which will increase the size of the video. Let me know if this solves your problem.
@hareemsaleha1762
@hareemsaleha1762 6 жыл бұрын
sir kindly change this blue colour .......nothing visible
@hefinrhys8572
@hefinrhys8572 6 жыл бұрын
Hi Hareem! I'm sorry you're having trouble viewing the video. Is it possible you're not viewing the video in HD? Select the gear in the lower right corner of the screen and set the Quality option to 1080p. It may also help you to view the video in Cinema mode or full screen, which are also options in the lower right corner of the screen. I hope this helps.
@hareemsaleha1762
@hareemsaleha1762 6 жыл бұрын
ohhh thank u soo much sir.......nd u are right i am not veiwing video in HD...
Writing functions in R
22:32
Hefin Rhys
Рет қаралды 40 М.
Loops using R programming
13:37
R Programming 101
Рет қаралды 16 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 33 МЛН
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 170 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 8 МЛН
While Loops in R
11:01
Richard Webster
Рет қаралды 48 М.
If statements in Python are easy (if, elif, else) 🤔
8:21
Bro Code
Рет қаралды 156 М.
Introduction To `if` Statements In R
7:18
weecology
Рет қаралды 8 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 80 М.
R Basics 6 - While and For Loops
12:11
Maths Partner
Рет қаралды 28 М.
Writing Your Own Functions in R: Introduction
12:45
weecology
Рет қаралды 48 М.
Learn JavaScript WHILE LOOPS in 8 minutes! 🔁
8:12
Bro Code
Рет қаралды 36 М.
Conditional Statements in R (If, Else If, and Else)
12:02
Becoming a Data Scientist
Рет қаралды 17 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 33 МЛН