Complete the code to assign the value 10 to the variable x.
x [1] 10
In R, the most common assignment operator is <-, which assigns the value on the right to the variable on the left.
Complete the code to assign the value 5 to the variable y using the rightward assignment operator.
5 [1] y
The rightward assignment operator -> assigns the value on the left to the variable on the right.
Fix the error in the code to correctly assign 20 to variable z.
z [1] 20
The operator <- correctly assigns the value 20 to variable z. The operator == is for comparison, not assignment.
Fill both blanks to assign the value 15 to variable a using the standard assignment operator and then print a.
a [1] 15 print([2])
Use <- to assign 15 to a. Then print the value of a by passing it to the print() function.
Fill all three blanks to assign 30 to variable b, then assign b's value to c, and finally print c.
b [1] 30 c [2] b print([3])
Use <- to assign 30 to b, then assign b to c. Finally, print c to see the value.