Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Basic Arithmetic | Section
Practice
Projects
Quizzes & Challenges
Quizzer
Challenges
/
Essential R Programming for Absolute Beginners - 1768563985826

bookBasic Arithmetic

In R, arithmetic expressions can be written directly in the console, and the result is displayed without the need for an explicit print function.

Arithmetic Operators

You can use the following operators for basic arithmetic:

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

Example

1234
12 + 21 32 - 16 10 * 11 13 / 5
copy
Note
Note

Each new operation should start on a new line.

Opgave

Swipe to start coding

Perform the following calculations using basic arithmetic operations:

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

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookBasic Arithmetic

Stryg for at vise menuen

In R, arithmetic expressions can be written directly in the console, and the result is displayed without the need for an explicit print function.

Arithmetic Operators

You can use the following operators for basic arithmetic:

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

Example

1234
12 + 21 32 - 16 10 * 11 13 / 5
copy
Note
Note

Each new operation should start on a new line.

Opgave

Swipe to start coding

Perform the following calculations using basic arithmetic operations:

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

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
single

single

some-alt