File: stri_dup.Rd

package info (click to toggle)
r-cran-stringi 1.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 30,632 kB
  • sloc: cpp: 301,844; perl: 471; makefile: 9; sh: 1
file content (55 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/join.R
\name{stri_dup}
\alias{stri_dup}
\alias{operator_multiply}
\alias{oper_multiply}
\alias{\%s*\%}
\alias{\%stri*\%}
\title{Duplicate Strings}
\usage{
stri_dup(str, times)

e1 \%s*\% e2

e1 \%stri*\% e2
}
\arguments{
\item{str, e1}{a character vector of strings to be duplicated}

\item{times, e2}{an integer vector with the numbers of times to duplicate each string}
}
\value{
Returns a character vector.
}
\description{
Duplicates each \code{str}(\code{e1}) string \code{times}(\code{e2}) times
and concatenates the results.
}
\details{
Vectorized over all arguments.

\code{e1 \%s*\% e2} and \code{e1 \%stri*\% e2} are synonyms
for \code{stri_dup(e1, e2)}
}
\examples{
stri_dup('a', 1:5)
stri_dup(c('a', NA, 'ba'), 4)
stri_dup(c('abc', 'pqrst'), c(4, 2))
"a" \%s*\% 5
}
\seealso{
The official online manual of \pkg{stringi} at \url{https://stringi.gagolewski.com/}

Gagolewski M., \pkg{stringi}: Fast and portable character string processing in R, \emph{Journal of Statistical Software} 103(2), 2022, 1-59, \doi{10.18637/jss.v103.i02}

Other join: 
\code{\link{\%s+\%}()},
\code{\link{stri_flatten}()},
\code{\link{stri_join_list}()},
\code{\link{stri_join}()}
}
\concept{join}
\author{
\href{https://www.gagolewski.com/}{Marek Gagolewski} and other contributors
}