mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
This commit is contained in:
parent
6c44be558d
commit
912fff7474
32 changed files with 2340 additions and 273 deletions
|
|
@ -4,11 +4,23 @@
|
|||
\alias{line_break}
|
||||
\title{Line breaking at given number of characters for nicely plotting labels}
|
||||
\usage{
|
||||
line_break(data, lineLength = 20)
|
||||
line_break(data, lineLength = 20, fixed = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{lineLength}{}
|
||||
\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(fixed=TRUE)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue