Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/library/base/man/paste.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ paste0(\dots, collapse = NULL, recycle0 = FALSE)
desirable, e.g.\sspace{}in \code{paste("the value of p is ", p)}.

\code{paste0(\dots, collapse)} is equivalent to
\code{paste(\dots, sep = "", collapse)}, slightly more efficiently.
\code{paste(\dots, sep = "", collapse)}, slightly more efficiently
as it avoids handling a separator.

If a value is specified for \code{collapse}, the values in the result
are then concatenated into a single string, with the elements being
Expand Down
4 changes: 4 additions & 0 deletions src/library/base/man/substr.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ substr("abcdef", 2, 4)
substring("abcdef", 1:6, 1:6)
## strsplit() is more efficient ...

## Extraction behavior from zero-length strings and empty strings
substr(character(0), 1, 2) # returns character(0)
substring(c("abc", ""), 2) # returns "bc" and ""

substr(rep("abcdef", 4), 1:4, 4:5)
x <- c("asfef", "qwerty", "yuiop[", "b", "stuff.blah.yech")
substr(x, 2, 5)
Expand Down