mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-21 05:19:07 +02:00
Deploying to gh-pages from @ agdamsbo/FreesearchR@54dd332cd8 🚀
This commit is contained in:
parent
4cf4bd0499
commit
6d545337de
328 changed files with 12930 additions and 1662 deletions
37
reference/line_break.md
Normal file
37
reference/line_break.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Line breaking at given number of characters for nicely plotting labels
|
||||
|
||||
Line breaking at given number of characters for nicely plotting labels
|
||||
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
line_break(data, lineLength = 20, force = FALSE)
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- data:
|
||||
|
||||
string
|
||||
|
||||
- lineLength:
|
||||
|
||||
maximum line length
|
||||
|
||||
- fixed:
|
||||
|
||||
flag to force split at exactly the value given in lineLength. Default
|
||||
is FALSE, only splitting at spaces.
|
||||
|
||||
## Value
|
||||
|
||||
character string
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
"Lorem ipsum... you know the routine" |> line_break()
|
||||
#> [1] "Lorem ipsum... you\nknow the routine"
|
||||
paste(sample(letters[1:10], 100, TRUE), collapse = "") |> line_break(force = TRUE)
|
||||
#> [1] "ibgccehdajdebjihfdbc\nbacigaffbaadgbabdedh\ncjeaifgdbjhieacaagga\nagdfeediafjfibbfjihd\negiebfajgfhcgbi\n"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue