Learn R Programming

MergeGUI (version 0.2-1)

simplifynames: Short the names from a template. The merging GUI is designed to merge data from different files. But sometimes the file names are too long to be displayed in the GUI. Hence this function is used to short the basenames by removing the same beginning letters of each name. Hence the output is a character vector whose elements will not start with the same letter.

Description

Short the names from a template. The merging GUI is designed to merge data from different files. But sometimes the file names are too long to be displayed in the GUI. Hence this function is used to short the basenames by removing the same beginning letters of each name. Hence the output is a character vector whose elements will not start with the same letter.

Usage

simplifynames(namevector)

Arguments

namevector
A character vector.

Value

A character vector which cuts the first several same letters from the input.

Examples

Run this code
simplifynames(c("abc234efg.csv", "abc234hfg.csv"))
simplifynames(c("12345", "54321"))
simplifynames(c("aeiou", "aerial"))

Run the code above in your browser using DataLab