Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Assignment Operators | Section
Practice
Projects
Quizzes & Challenges
Frågesporter
Challenges
/
Essential R Programming for Absolute Beginners - 1768563985826

bookAssignment Operators

R provides several operators for assigning values to variables.

year = 2020
year <- 2020
2020 -> year

However, -> is rarely used because it reduces code readability.

Note
Note

Going forward, assignments will be shown using the left arrow (<-) and the equal sign (=).

Uppgift

Swipe to start coding

  1. Use the equal sign (=) to assign the result of 29 %/% 8 to the variable named equal.
  2. Use the left arrow (<-) to assign the result of 29 %% 8 to the variable named left.
  3. Use the right arrow (->) to assign the result of equal ^ left to the variable named right.
  4. Print the values of equal, left, and right in sequence using the cat() function.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 10
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookAssignment Operators

Svep för att visa menyn

R provides several operators for assigning values to variables.

year = 2020
year <- 2020
2020 -> year

However, -> is rarely used because it reduces code readability.

Note
Note

Going forward, assignments will be shown using the left arrow (<-) and the equal sign (=).

Uppgift

Swipe to start coding

  1. Use the equal sign (=) to assign the result of 29 %/% 8 to the variable named equal.
  2. Use the left arrow (<-) to assign the result of 29 %% 8 to the variable named left.
  3. Use the right arrow (->) to assign the result of equal ^ left to the variable named right.
  4. Print the values of equal, left, and right in sequence using the cat() function.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 10
single

single

some-alt