The function rep() in R will repeat a number or a sequence of numbers n times. For example, typing rep(5, 5) will print the number 5 five times.