-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
99 lines (72 loc) · 2.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
---
title: "R Package SeaLev"
author: "Yves Deville"
date: "2023-05-22"
output: github_document
---
# Scope
The **SeaLev** package is a R package funded by IRSN/Behrig. It is
devoted to the distribution of a Sea Level random variable (r.v.) say
$Z$, viewed as the sum of two independent r.vs $X$ and $Y$
representing the astronomical tide and the surge. More precisely the
r.vs relate to a *tide interval* defined as the time interval
separating two consecutive astronomical low tides. Then $X$ is the
astronomical *high-tide* level and $Y$ is the so-called *skew surge*
representing the difference between the observed highest level and the
astronomical high tide level.
- The distribution of $X$ can be regarded a perfectly known. More
precisely, the support of $X$ is an interval $[x_{\texttt{min}}, \,
x_{\texttt{max}}]$ where both end-points are finite and known, and
$X$ admits a continuous known density $f_X(x)$ on this interval.
- By fitting a Peaks Over Threshold (POT) model from observed skew
surges $Y_i$ one can regard the tail distribution of $Y$ as that of
a Generalized Pareto Distribution (GPD).
Then the tail distribution of $Z$ can be computed by convolution.
Mind that this package is quite old since it was created during the
pre-RStudio era.
# SeaLev Guide
The package does not have any vignette as such, yet the [SeaLev
Package guide](https://github.com/IRSN/SeaLev/blob/main/inst/doc/SeaLevGuide.pdf)
available here is shipped with the package as a pdf file (with extra
compression).
# Installation
## Using the *remotes* package
In an R session use
```{r, eval=FALSE}
library(remotes)
install_github("IRSN/SeaLev", dependencies = TRUE)
```
This should install the package and make it ready to use.
You can also select a specific branch or a specific commit by using
the suitable syntax for `install_github`. For instance to install the
branch `develop` use
```{r, eval=FALSE}
install_github("IRSN/SeaLev@develop", dependencies = TRUE)
```
See the **remotes** package documentation for more details.
## Clone, build and install
### Cloning the repository
You can also clone the repository to install the package. If you do
not have yet a local `SeaLev` repository, use `git clone` to clone the
`SeaLev` repository
``` bash
git clone https://github.com/IRSN/SeaLev
```
This will create a `SeaLev` sub-directory of the current directory,
i.e. the directory from which the git command was issued. Of course
this can work only if you have the authorisation to clone.
### Installation
Move to the parent directory of your cloned repository and use the
following command from a terminal to create a tarball source file
``` bash
R CMD build SeaLev
```
This will produce a source tarball `SeaLev_x.y.z` where `x`, `y` and
`z` stand for the major, minor and patch version numbers. Then you can
install from a command line
``` bash
R CMD INSTALL SeaLev_x.y.z
```
Note that you must also have all the packages required by **SeaLev**
installed.
You can also use the **RStudio** IDE to install the package.