mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 01:49:39 +02:00
26 lines
725 B
R
26 lines
725 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/data_plots.R
|
|
\name{line_break}
|
|
\alias{line_break}
|
|
\title{Line breaking at given number of characters for nicely plotting labels}
|
|
\usage{
|
|
line_break(data, lineLength = 20, force = FALSE)
|
|
}
|
|
\arguments{
|
|
\item{data}{string}
|
|
|
|
\item{lineLength}{maximum line length}
|
|
|
|
\item{fixed}{flag to force split at exactly the value given in lineLength.
|
|
Default is FALSE, only splitting at spaces.}
|
|
}
|
|
\value{
|
|
character string
|
|
}
|
|
\description{
|
|
Line breaking at given number of characters for nicely plotting labels
|
|
}
|
|
\examples{
|
|
"Lorem ipsum... you know the routine" |> line_break()
|
|
paste(sample(letters[1:10], 100, TRUE), collapse = "") |> line_break(force = TRUE)
|
|
}
|