Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardJActon committed Apr 30, 2021
1 parent 9a296df commit 28f939a
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
^renv$
^renv\.lock$
^colourScaleR\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.Rdata
.httr-oauth
.DS_Store
renv**
.Rprofile
2 changes: 1 addition & 1 deletion R/universal_colour_scaler.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ universal_colour_scaler <- function(
} else if(scale == "log") {
breaks <- lseq(from = minx, to = maxx, length_out = n_breaks)
} else if(scale == "quantile") {
breaks <- quantile(
breaks <- stats::quantile(
x = x,
probs = seq(0, 1, length.out = n_breaks),
na.rm = TRUE
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# colourScaleR

<!-- badges: start -->
<!-- badges: end -->

`colourScaleR` provides a unified interface to [scico](https://github.com/thomasp85/scico), [viridis](https://github.com/sjmgarnier/viridis), & [Color Brewer](https://colorbrewer2.org) for creating colour scales

## Installation

You can install the development version of `colourScaleR` from [github](https://github.com/RichardJActon/colourScaleR) with:

``` r
remotes::install_github("RichardJActon/colourScaleR")
```

## Example

``` r
library(colourScaleR)

universal_colour_scaler(
rnorm(10),
type = "brewer",
scale = "log",
palette = "RdYlBu",
verbose = TRUE,
n_breaks = 10,
mode = "scaled",
direction = -1
)
```

18 changes: 18 additions & 0 deletions man/lseq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions man/range_check.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions man/universal_colour_scaler.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28f939a

Please sign in to comment.