Learn R Programming

qdap (version 2.4.6)

duplicates: Find Duplicated Words in a Text String

Description

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

Usage

duplicates(string, threshold = 1)

Value

Returns a vector of all duplicated words/chunks.

Arguments

string

A character string.

threshold

An integer of the minimal number of repeats.

Examples

Run this code
if (FALSE) {
duplicates(DATA$state)
duplicates(DATA$state[1])
}

Run the code above in your browser using DataLab