Learn R Programming

tractor.base (version 3.3.5.1)

embrace: Combine similar strings into one

Description

Merge a vector of strings with a common prefix and/or suffix into one string with the unique parts in braces, comma-separated.

Usage

embrace(strings)

Value

A single merged string, with the common prefix and suffix as attributes.

Arguments

strings

A vector, which will be coerced to mode character.

Author

Jon Clayden

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. https://www.jstatsoft.org/v44/i08/.

Examples

Run this code
embrace(c("image.hdr", "image.img"))

Run the code above in your browser using DataLab