Learn R Programming

clinpubr (version 1.1.1)

common_prefix: Get common prefix of a string vector

Description

Get common prefix of a string vector

Usage

common_prefix(x)

Value

A string that is the common prefix of the input vector.

Arguments

x

A string vector.

Examples

Run this code
common_prefix(c("Q1_a", "Q1_b", "Q1_c"))

Run the code above in your browser using DataLab