Skip to content

Commit 517f010

Browse files
authored
@Seealso link to str_subset() from str_detect()
I always forget what `str_subset()` is called, and end up looking at the docs for `str_detect()` first when I want it.
1 parent dd6fb7c commit 517f010

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/detect.r

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
#' \code{\link{boundary}()}. An empty pattern, "", is equivalent to
2020
#' \code{boundary("character")}.
2121
#' @return A logical vector.
22-
#' @seealso \code{\link[stringi]{stri_detect}} which this function wraps
22+
#' @seealso \code{\link[stringi]{stri_detect}} which this function wraps,
23+
#' \code{\link{str_subset}} for a convenient wrapper around
24+
#' \code{x[str_detect(x, pattern)]}
2325
#' @export
2426
#' @examples
2527
#' fruit <- c("apple", "banana", "pear", "pinapple")

0 commit comments

Comments
 (0)