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 (=).
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 10
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 2.27
Assignment Operators
Scorri per mostrare il menu
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 (=).
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 10
single