-
Notifications
You must be signed in to change notification settings - Fork 6
/
README.Rmd
124 lines (83 loc) · 5.99 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# RLumShiny <a href='https://tzerk.github.io/RLumShiny/'><img src='man/figures/logo.png' align="right" height="138.5" /></a>
<!-- badges: start -->
[![CRAN](https://www.r-pkg.org/badges/version/RLumShiny)](https://cran.rstudio.com/package=RLumShiny)
[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/RLumShiny)](https://www.r-pkg.org/pkg/RLumShiny)
[![Downloads](https://cranlogs.r-pkg.org/badges/RLumShiny)](https://www.r-pkg.org/pkg/RLumShiny)
[![Downloads](https://cranlogs.r-pkg.org/badges/last-week/RLumShiny)](https://www.r-pkg.org/pkg/RLumShiny)
[![Downloads](https://cranlogs.r-pkg.org/badges/last-day/RLumShiny)](https://www.r-pkg.org/pkg/RLumShiny)
[![Build status](https://ci.appveyor.com/api/projects/status/jp8ueedudbuhvtfe/branch/master?svg=true)](https://ci.appveyor.com/project/tzerk/rlumshiny/branch/master)
[![R-CMD-check](https://github.com/R-Lum/RLumShiny/workflows/R-CMD-check/badge.svg)](https://github.com/R-Lum/RLumShiny/actions)
<!-- badges: end -->
> Visit the <a href="https://tzerk.github.io/RLumShiny/" target="_blank">project page</a>!
> Follow us on [![alt text][1.1]][1] <a href="https://www.twitter.com/RLuminescence" target="_blank">@RLuminescence</a>
[1.1]: man/figures/twitter.png (twitter icon without padding)
[1]: https://www.twitter.com/RLuminescence
# Overview
A collection of `shiny` applications for the R package `Luminescence`. These mainly, but not exclusively, include applications for plotting chronometric data from e.g. luminescence or radiocarbon dating. It further provides access to twitter bootstraps tooltip and pop over functionality and contains the [jscolor.js library](https://jscolor.com/) with a custom `shiny` output binding.
## Installation
To install the stable version from CRAN, simply run the following from an R console:
```{r, eval = FALSE}
install.packages("RLumShiny")
```
To install the latest development builds directly from GitHub, run
```{r, eval = FALSE}
if (!require("devtools"))
install.packages("devtools")
devtools::install_github("tzerk/RLumShiny@master")
```
## Applications
The RLumShiny package provides a single function from which all apps can be started: `app_RLum()`. It essentially only takes one argument, which is a unique keyword to specify which app to start. See the table below for a list of available apps and which keywords to use.
| Application | Keyword | Function |
|-------------|:---------:|----------|
| Abanico Plot | abanico | `plot_AbanicoPlot` |
| Histogram | histogram | `plot_Histogram` |
| Kernel Density Estimate Plot | KDE | `plot_KDE` |
| Radial Plot | radialplot | `plot_RadialPlot` |
| Dose Recovery Test | doserecovery | `plot_DRTResults` |
| Cosmic Dose Rate | cosmicdose | `calc_CosmicDoseRate`|
| CW Curve Transformation | transformCW | `CW2pHMi`, `CW2pLM`, `CW2pLMi`, `CW2pPMi` |
| Plot Filter Combinations | filter | `plot_FilterCombinations` |
| Calculate Fast Ratio | fastratio | `calc_FastRatio` |
| Fading measurement analysis and correction | fading | `analyse_FadingMeasurement`, `calc_FadingCorr` |
| Test OSL/IRSL Stimulation Power | teststimulationpower | `plot_RLum` |
| Scale Gamma Dose Rate† | scalegamma | `scale_GammaDose()` |
| Model dose rate evolution in carbonate-rich samples | RCarb | `RCarb::model_DoseRate` |
The `app_RLum()` function is just a wrapper for `shiny::runApp()`. Via the `...` argument further arguments can be directly passed to `shiny::runApp()`. See `?shiny::runApp` for further details on valid arguments.
<!--- * Not yet available in the official CRAN release. -->
† Requires the development version (`@dev_0.9.0`-branch) of the `Luminescence` package.
## Extending Shiny
In addition to its main purpose of providing convenient access to the Luminescence shiny applications this package also provides further functions to extend the functionality of `shiny`. From the Bootstrap framework the JavaScript tooltip and popover components can be added to any shiny application via `tooltip()` and `popover()`.
It further provides a custom input binding to the JavaScript/HTML color picker [JSColor](https://jscolor.com). Offering access to most options provided by the JSColor API the function `jscolorInput()` is easily implemented in a shiny app. RGB colors are returned as hex values and can be directly used in **R**'s base plotting functions without requiring any format conversion.
## Examples
### Abanico Plot app
`app_RLum("abanico")`
![Abanico app](man/figures/abanico.png)
### Tooltip
`tooltip(refId, text, attr = NULL, animation = TRUE, delay = 100, html = TRUE, placement = "auto", trigger = "hover")`
![tooltip](man/figures/tooltip.png)
### JSColor
`jscolorInput(inputId, label, value, position = "bottom", color = "transparent", mode = "HSV", slider = TRUE, close = FALSE)`
![jscolor.js](man/figures/jscolor.png)
## Contribute
This package is part of the R Luminescence project. The is based on and evolves from ideas, contributions and constructive criticism of its users. Help us to maintain and develop the package, to find bugs and create new functions as well as a user-friendly design. Visit our [message board](https://r-luminescence.org) or write us an [e-mail](mailto:team@r-luminescence.org) if anything crosses your mind or if you want your new self-written shiny application to be to implemented. You are kindly invited to bring forward the package with us!
## Note
This version is a development version and it comes without any guarantee! For stable branches please visit
the package on [CRAN 'RLumShiny'](https://CRAN.R-project.org/package=RLumShiny ).
## License
The `'RLumShiny'` package is licensed under the GPLv3. See these files in the main directory for additional details:
- LICENSE.note
## Related projects
* [RLumModel](https://github.com/R-Lum/RLumModel)
* [Luminescence](https://github.com/R-Lum/Luminescence)
* [RCarb](https://github.com/R-Lum/RCarb)