Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Basic Arithmetic | Basic Syntax and Operations
R Introduction: Part I
course content

Conteúdo do Curso

R Introduction: Part I

R Introduction: Part I

1. Basic Syntax and Operations
2. Basic Data Types and Vectors
3. Factors

Basic Arithmetic

Unlike many other programming languages, R doesn't need a specific function to display output. So, let's begin our R journey with some simple arithmetic to get started.

In R, you can perform basic arithmetic using the following operators:

  • + for addition;
  • - for subtraction;
  • * for multiplication;
  • / for division.

For example, let's compute a few mathematical expressions:

123
12 + 21 32 - 16 10 * 11
copy

As you can see, there's nothing complicated here.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 1. Capítulo 2
toggle bottom row

Basic Arithmetic

Unlike many other programming languages, R doesn't need a specific function to display output. So, let's begin our R journey with some simple arithmetic to get started.

In R, you can perform basic arithmetic using the following operators:

  • + for addition;
  • - for subtraction;
  • * for multiplication;
  • / for division.

For example, let's compute a few mathematical expressions:

123
12 + 21 32 - 16 10 * 11
copy

As you can see, there's nothing complicated here.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 1. Capítulo 2
toggle bottom row

Basic Arithmetic

Unlike many other programming languages, R doesn't need a specific function to display output. So, let's begin our R journey with some simple arithmetic to get started.

In R, you can perform basic arithmetic using the following operators:

  • + for addition;
  • - for subtraction;
  • * for multiplication;
  • / for division.

For example, let's compute a few mathematical expressions:

123
12 + 21 32 - 16 10 * 11
copy

As you can see, there's nothing complicated here.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Unlike many other programming languages, R doesn't need a specific function to display output. So, let's begin our R journey with some simple arithmetic to get started.

In R, you can perform basic arithmetic using the following operators:

  • + for addition;
  • - for subtraction;
  • * for multiplication;
  • / for division.

For example, let's compute a few mathematical expressions:

123
12 + 21 32 - 16 10 * 11
copy

As you can see, there's nothing complicated here.

Tarefa

Perform the following calculations using basic arithmetic operations:

  1. 30 + 24;
  2. 50 - 36;
  3. 19 * 7.

After completing these tasks, press the button below the code to check your answers.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 1. Capítulo 2
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt