lets break this down
y is indeed a letter, and a suitable name for an object that we can assign values to. So off to a good start.
<- is the assignment operator that will attach the value on the right with the name on the left. also good
<2 this is a problem. it is not a value. it is a partial condition. In english it would be 'strictly less than 2', there are an infinitude of values that would meet such a condition. assignment with <- should be used on concrete values , or expressions that evaluate to concrete values.
You could assign 2 to a variable
y <- 2
you could assign the text string "<2" to a variable
y <- "<2"
but you cant assign a partial condition
y<- <2 #error