You've done an excellent job with this R series. 👌
@KuroSan975 жыл бұрын
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.
@DataDaft5 жыл бұрын
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 Жыл бұрын
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