TADA_InsertBreaks: Insert Breaks

View source: R/Utilities.R

TADA_InsertBreaksR Documentation

Insert Breaks

Description

This function inserts a new line into a string when it exceeds a user-specified length. New lines are added to spaces in the string. This is intended to make plot legends more readable and tidy.

Usage

TADA_InsertBreaks(x, len = 50)

Arguments

x

A vector of strings

len

The maximum character length a string can be before the function searches for the best space to insert a new line.

Value

The same vector of strings with new lines added where appropriate.


USEPA/TADA documentation built on April 12, 2025, 1:47 p.m.