seq() and the : Operator (R)

seq() generates regular sequences of numbers, and the colon operator a:b creates a sequence of consecutive integers from a to b. Both are core tools for…