# R Program to illustrate # the use of strrep function# String to be repeated
x <-"Geeks"# Calling strrep() function
strrep(x,5)
R
输出
[1]"GeeksGeeksGeeksGeeksGeeks"
R
例2 :
# R Program to illustrate # the use of strrep function# String to be repeated
x <-"Geeks"
y <-"4 "# Calling strrep() function
strrep(x,5)
strrep(y,5)
strrep(x,5)