Get startedGet started for free

How it works

Welcome to our Kaggle Machine Learning Tutorial, that guides you through Kaggle's Titanic competition using R and Machine Learning. If you're new to R, you can take our free Introduction to R Tutorial. Although it's not required, familiarity with machine learning techniques is a plus to get the maximum out of this tutorial.

In the editor on the right you should type R code to solve the exercises. When you hit the 'Submit Answer' button, every line of code is interpreted and executed by R and you get a message whether or not your code was correct. The output of your R code is shown in the console in the lower right corner. You can also type and execute code into the console to experiment with R code: your submission is not checked for correctness in this case.

This exercise is part of the course

Kaggle R Tutorial on Machine Learning

View Course

Exercise instructions

  • In the editor on the right there is already some sample code. Can you see which lines are actual R code and which are comments?
  • Add a line of code that calculates the sum of 6 and 12, and hit the 'Submit Answer' button.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate 3 + 4
3 + 4

# Calculate 6 + 12
Edit and Run Code