From 636d46b1bab4b29f708ea8ea46239539ccdbf9bd Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Mon, 14 Jan 2019 23:48:29 +0900 Subject: [PATCH] Add stri_sub_replace() --- R/sub.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/sub.R b/R/sub.R index 6db8aee3f..d6e3f7cf0 100644 --- a/R/sub.R +++ b/R/sub.R @@ -122,7 +122,7 @@ stri_sub <- function(str, from = 1L, to = -1L, length) { #' @rdname stri_sub #' @export #' @usage stri_sub(str, from = 1L, to = -1L, length, omit_na=FALSE) <- value -"stri_sub<-" <- function(str, from = 1L, to = -1L, length, omit_na=FALSE, value) { +stri_sub_replace <- function(str, from = 1L, to = -1L, length, omit_na=FALSE, value) { if (missing(length)) { if (is.matrix(from) && !missing(to)) warning("argument `to` is ignored in the current context") @@ -136,3 +136,7 @@ stri_sub <- function(str, from = 1L, to = -1L, length) { .Call(C_stri_sub_replacement, str, from, NULL, length, omit_na, value) } } + +#' @rdname stri_sub +#' @export +"stri_sub<-" <- stri_sub_replace