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]
        }
meerapatelmd/centipede documentation built on Jan. 1, 2021, 9:27 a.m.