Assignment 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
Going forward, assignments will be shown using the left arrow (<-) and the equal sign (=).
Завдання
Swipe to start coding
- Use the equal sign (
=) to assign the result of29 %/% 8to the variable namedequal. - Use the left arrow (
<-) to assign the result of29 %% 8to the variable namedleft. - Use the right arrow (
->) to assign the result ofequal ^ leftto the variable namedright. - Print the values of
equal,left, andrightin sequence using thecat()function.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 10
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 2.27
Assignment 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
Going forward, assignments will be shown using the left arrow (<-) and the equal sign (=).
Завдання
Swipe to start coding
- Use the equal sign (
=) to assign the result of29 %/% 8to the variable namedequal. - Use the left arrow (
<-) to assign the result of29 %% 8to the variable namedleft. - Use the right arrow (
->) to assign the result ofequal ^ leftto the variable namedright. - Print the values of
equal,left, andrightin sequence using thecat()function.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 10
single