Using print() function in R to print dashed lines (not in graphs) [duplicate]

Solution 1:

strrep("_", 70) this is just a base R function

[1] "______________________________________________________________________"

Solution 2:

print(paste(rep("_", 70), collapse = ""))

This works, but maybe there is a more elegant solution (it should also work without print())