Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

truncString

Truncate strings and add ellipses if a string is truncated.


Description

Truncates one or more strings to a specified length, adding an ellipsis (...) to those strings that have been truncated. The justification of the strings can be controlled by the justify argument as in format, which does the padding and justification.

Usage

truncString(x,maxlen=20,justify="left")

Arguments

x

A vector of strings.

maxlen

The maximum length of the returned strings.

justify

Justification for the new strings.

Value

The string(s) passed as x now with a maximum length of maxlen.

Author(s)

Jim Lemon

See Also


prettyR

Pretty Descriptive Stats

v2.2-3
GPL (>= 2)
Authors
Jim Lemon <drjimlemon@gmail.com>, Philippe Grosjean <phgrosjean@sciviews.org>
Initial release
2019-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.