R/extract_word_by_index.R

Defines functions extract_word_by_index

Documented in extract_word_by_index

#' Return the word in the string by number
#' @param string character vector of length one
#' @param n word number
#' @export

extract_word_by_index <-
        function(string, n) {
                base::strsplit(string, split = " ")[[1]][n]
        }
patelm9/centipede documentation built on Dec. 4, 2020, 3:09 a.m.