get_prefix {DEP} | R Documentation

## Obtain the longest common prefix

### Description

`get_prefix` returns the longest common prefix of the supplied words.

### Usage

    get_prefix(words)

### Arguments

`words` | Character vector, A list of words.

### Value

A character vector containing the prefix.

### Examples

    # Load example
    data <- UbiLength
    columns <- grep("LFQ.", colnames(data))

    # Get prefix
    names <- colnames(data[, columns])
    get_prefix(names)

[Package DEP version 1.8.0 Index]