mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-12-16 17:42:10 +01:00
31 lines
423 B
Markdown
31 lines
423 B
Markdown
# Create unique short names of character vector items based on index
|
|
|
|
The function will prefer original names, and only append index to long
|
|
strings.
|
|
|
|
## Usage
|
|
|
|
``` r
|
|
unique_short(data, max = 15)
|
|
```
|
|
|
|
## Arguments
|
|
|
|
- data:
|
|
|
|
character vector
|
|
|
|
- max:
|
|
|
|
maximum final name length
|
|
|
|
## Value
|
|
|
|
character vector
|
|
|
|
## Examples
|
|
|
|
``` r
|
|
c("kahdleidnsallskdj", "hej") |> unique_short()
|
|
#> [1] "kahdleidnsall_1" "hej"
|
|
```
|