truncateName {MetCirc} | R Documentation

## Truncate names

### Description

A function to truncate names

### Usage

    truncateName(groupname, roundDigits = 2, group = FALSE)

### Arguments

`groupname` | `character` vector with group and unique idenfier (name)
`roundDigits` | `numeric`, how many digits should be displayed?
`group` | `logical`, should groups be returned?

### Details

`groupname` is a vector of `character` strings consisting of a group, retention time and m/z value, separated by "_". It is cumbersome to display such long strings. `truncateName` truncates these strings by rounding retention time and m/z values by digits given by `roundDigits`. `truncateName` is an internal function.

### Value

`truncateName` returns groupname with truncated names without group)

### Author(s)

Thomas Naake, thomasnaake@googlemail.com

### Examples

         groupname <- "a_100.12345/10.12345"
         truncateName(groupname, roundDigits = 2, group = FALSE)

[Package MetCirc version 1.10.0 Index]