mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-12-16 17:42:10 +01:00
41 lines
423 B
Markdown
41 lines
423 B
Markdown
|
|
# Easily round log scale limits for nice plots
|
||
|
|
|
||
|
|
Easily round log scale limits for nice plots
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
``` r
|
||
|
|
limit_log(data, fun, ...)
|
||
|
|
```
|
||
|
|
|
||
|
|
## Arguments
|
||
|
|
|
||
|
|
- data:
|
||
|
|
|
||
|
|
data
|
||
|
|
|
||
|
|
- fun:
|
||
|
|
|
||
|
|
rounding function (floor/ceiling)
|
||
|
|
|
||
|
|
- ...:
|
||
|
|
|
||
|
|
ignored
|
||
|
|
|
||
|
|
## Value
|
||
|
|
|
||
|
|
numeric vector
|
||
|
|
|
||
|
|
## Examples
|
||
|
|
|
||
|
|
``` r
|
||
|
|
limit_log(-.1, floor)
|
||
|
|
#> [1] 0.7
|
||
|
|
limit_log(.1, ceiling)
|
||
|
|
#> [1] 2
|
||
|
|
limit_log(-2.1, ceiling)
|
||
|
|
#> [1] 0.008
|
||
|
|
limit_log(2.1, ceiling)
|
||
|
|
#> [1] 200
|
||
|
|
```
|