We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0f03f5 commit 718ff98Copy full SHA for 718ff98
R/word.r
@@ -28,9 +28,9 @@
28
#' word(str, 2, sep = fixed('..'))
29
word <- function(string, start = 1L, end = start, sep = fixed(" ")) {
30
n <- max(length(string), length(start), length(end))
31
- string <- rep(string, length = n)
32
- start <- rep(start, length = n)
33
- end <- rep(end, length = n)
+ string <- rep(string, length.out = n)
+ start <- rep(start, length.out = n)
+ end <- rep(end, length.out = n)
34
35
breaks <- str_locate_all(string, sep)
36
words <- lapply(breaks, invert_match)
0 commit comments