-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
57 lines (38 loc) · 2.09 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/palr)](https://CRAN.R-project.org/package=palr)
[![R-CMD-check](https://github.com/AustralianAntarcticDivision/palr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/AustralianAntarcticDivision/palr/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
# palr
`palr` provides colour palettes for data, based on some well known remotely sensed data sets for sea ice concentration, sea surface temperature and chlorophyll-a. It includes function `image_pal()` to create the data used by the `image()` function *as colours*.
There are five main ways of working with palr palette functions, which have names like `ice_pal()`, `chl_pal()` and `sst_pal()` for ice, chlorophyll-a and sst respectively and `mk_timePal` for creating a time-mapped palette function.
* `ice_pal(n)` return n colours from the palette
* `ice_pal(data)` return the right colour for values in `data`
* `ice_pal(palette = TRUE)` returns the entire palette, with colours `cols` and intervals `breaks`
* `tfun <- mk_timePal(datetimes, pal); plot(x, tfun(dt))` match date-times to a palette, or palette function.
* `image_pal(data, col = colors, breaks = breaks)` emulates the behaviour of `image()` but return
colours as data rather than draw a plot
* `d_pal(data)` returns a colour for a set of values
See the website for documentation: https://australianantarcticdivision.github.io/palr/
## Installation
Install the current release from CRAN using
```R
install.packages("palr")
```
To install the development version:
```R
library(devtools)
install_github("AustralianAntarcticDivision/palr")
```
---
Please note that the palr project is released with a [Contributor Code of Conduct](https://github.com/AustralianAntarcticDivision/palr/blob/master/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.