duplicates function

Find Duplicated Words in a Text String

Find Duplicated Words in a Text String

Find duplicated word/word chunks in a string. Intended for internal use.

duplicates(string, threshold = 1)

Arguments

  • string: A character string.
  • threshold: An integer of the minimal number of repeats.

Returns

Returns a vector of all duplicated words/chunks.

Examples

## Not run: duplicates(DATA$state) duplicates(DATA$state[1]) ## End(Not run)
  • Maintainer: Tyler Rinker
  • License: GPL-2
  • Last published: 2023-05-11