Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Basic Arithmetic | Section
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.

Tehtävä

Swipe to start coding

Perform the following calculations using basic arithmetic operations:

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

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 2
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookBasic Arithmetic

Pyyhkäise näyttääksesi valikon

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.

Tehtävä

Swipe to start coding

Perform the following calculations using basic arithmetic operations:

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

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 2
single

single

some-alt