Video není dostupné.
Omlouváme se.

Introduction to R: Control Flow

Sdílet
Vložit
  • čas přidán 18. 08. 2024
  • You can go a long way in R doing data science using functions built into the base language or available in packages, but sooner or later you'll probably need to write custom code to perform an operation that is not available in a prepackaged function. In this lesson and the next, we'll learn the basic programming constructs in R so that you can create your own custom code and functions.
    This is lesson 11 of a 30-part introduction to the R programming language for data analysis and predictive modeling. Link to the code notebook below:
    Introduction to R: Control Flow www.kaggle.com...
    This guide does not assume any prior exposure to R, programming or data science. It is intended for beginners with an interest in data science and those who might know other programming languages and would like to learn R.
    I will create the videos for this guide such that you should be able to learn a lot just watching on CZcams, but to get the most out of the guide, it is recommended that you create a Kaggle account so that you can fork and edit each lesson so that you can follow along and run code yourself.
    Follow DataDaft on social media for news and updates:
    Twitter: / datadaft
    Introduction to R Playlist:
    • Introduction to R

Komentáře • 4

  • @musicspinner
    @musicspinner Před 3 lety +1

    You've done an excellent job with this R series. 👌

  • @KuroSan97
    @KuroSan97 Před 4 lety +2

    Very nice video, when I was trying to work through the notebook. I wanted to try printing the name of passengers in Exercise 2 of Control Flow. I can't seem to do it from inside the loop. Any help would be appreciated.

    • @DataDaft
      @DataDaft  Před 4 lety +2

      If you wanted to print passenger names of all passengers one after the other you could do this:
      for (passenger in titanic_train$Name){
      print(passenger)
      }
      If you only wanted to print passengers names over age 64, you could do it with something like this:
      for (passenger in titanic_train$Name){
      if (titanic_train$Age[which(titanic_train$Name == passenger)] >= 65){
      print(passenger)
      }
      }

  • @japhethjay4880
    @japhethjay4880 Před rokem

    He actually wrote else if and says if else , I don’t think this guy is a programmer, but amazing tutorials love them, they’ve been quite helpful, keep up , you earned a like and a sub and references to your channel