This is the the homework: (redacted)
I'm stuck at the beginning, since i do not understand how to make R read numbers like 0,1,2,3... as 00,01,02...
It doesn't affect my evaluation, but i would really appreciate to make a good first impression on my teacher.
Thanks in advance for anyone helping.