You can use several different commands that are similar to how calculator programming works. The sum function would take the sum of all entered after it.

> sum(1, 3, 5)
[1] 9

The repeat function is fairly intuitive.

> rep("Yo ho!", times = 3)
[1] "Yo ho!" "Yo ho!" "Yo ho!"

As is acquiring the square root.

> sqrt(16)
[1] 4