Like other programming languages, the value can be assigned to name variables in R. The assignment of a value to variable can be done as below.
> y
[1] 12
'=' can be also be used in place of '<-'. If '<-' is used, there should not be any space between two characters.
The name can be chosen from letter, digits and period symbol. But the name should not be started with a digit or period followed by a digit.
> 1. = 5
Error in 1 = 5 : invalid (do_set) left-hand side to assignment.
> .1 = 1
Error in 0.1 = 1 : invalid (do_set) left-hand side to assignment
Some characters are used already for defining functions. However, it would cause confusion if it is used for assigning a value. Few of the defined function characters are c, q, t , F, T etc.
c - Combine values into a vector or list
q - Terminate the current R session
t - Return a transpose of the given matrix
F & T - Logical argument TRUE or FALSE
Except F & T, other characters won't cause any trouble when they are assigned with value.