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

book
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:

12 + 21
32 - 16
10 * 11
123
12 + 21 32 - 16 10 * 11
copy

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

Tarea

Swipe to start coding

Perform the following calculations using basic arithmetic operations:

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

Solución

30 + 24
50 - 36
19 * 7
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 2
___
___
___

Pregunte a AI

expand
ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

some-alt