Skip to content

Commit 5f7cac6

Browse files
committed
Update README learning examples
1 parent 3de6c03 commit 5f7cac6

2 files changed

Lines changed: 144 additions & 5 deletions

File tree

README.Rmd

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,31 @@ You can install the development version from GitHub with:
2828

2929
```{r installation, eval = FALSE}
3030
# install.packages("remotes")
31-
remotes::install_github("hydrostat/ALEA")
31+
remotes::install_github(
32+
"hydrostat/ALEA",
33+
dependencies = TRUE,
34+
upgrade = "never"
35+
)
3236
```
3337

38+
If you also want the installed vignettes to be available through
39+
`utils::browseVignettes("ALEA")`, install with `build_vignettes = TRUE`:
40+
41+
```{r installation-vignettes, eval = FALSE}
42+
# install.packages("remotes")
43+
remotes::install_github(
44+
"hydrostat/ALEA",
45+
dependencies = TRUE,
46+
upgrade = "never",
47+
build_vignettes = TRUE
48+
)
49+
```
50+
51+
After installation, load the package with:
52+
53+
```{r load-package, eval = FALSE}
54+
library(ALEA)
55+
```
3456

3557
## Main features
3658

@@ -206,6 +228,52 @@ alea_export(rl, path = "return_levels.csv")
206228
alea_export(batch, path = "batch_results", type = "all")
207229
```
208230

231+
## Learning examples
232+
233+
Teaching-oriented ALEA-R workflow scripts are available in the `examples/`
234+
folder.
235+
236+
These examples use public Paraopeba hydrological data and demonstrate common
237+
frequency-analysis workflows:
238+
239+
- single-site frequency analysis;
240+
- comparison of candidate distributions;
241+
- return levels and bootstrap confidence intervals;
242+
- goodness-of-fit, diagnostics, and AI-assisted selection;
243+
- small batch analysis;
244+
- plots and exports.
245+
246+
Run the examples from the package root directory. For example:
247+
248+
```{r learning-examples-source, eval = FALSE}
249+
source("examples/01_single_site_basic_workflow.R")
250+
```
251+
252+
The example data files are stored in:
253+
254+
```text
255+
examples/data/
256+
```
257+
258+
Generated teaching outputs, such as exported plots and CSV files, are written to:
259+
260+
```text
261+
examples/output/
262+
```
263+
264+
The examples are designed for learning and classroom use. They use only the
265+
public ALEA-R API and the distributions supported in the current release:
266+
`gev`, `gpa`, `pe3`, `ln2`, `ln3`, and `gum`.
267+
268+
Installed vignettes can be listed with:
269+
270+
```{r browse-vignettes, eval = FALSE}
271+
utils::browseVignettes("ALEA")
272+
```
273+
274+
When installing from GitHub, use `build_vignettes = TRUE` if you want these
275+
vignettes to be installed locally.
276+
209277
## Current limitations
210278

211279
The initial implementation does not include:
@@ -220,8 +288,8 @@ The initial implementation does not include:
220288

221289
## Citation
222290

223-
A formal package citation will be added before the first public release.
291+
Please cite ALEA-R in reports and publications where it supports the analysis.
224292

225293
```{r citation, eval = FALSE}
226294
citation("ALEA")
227-
```
295+
```

README.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,30 @@ You can install the development version from GitHub with:
1717

1818
``` r
1919
# install.packages("remotes")
20-
remotes::install_github("hydrostat/ALEA")
20+
remotes::install_github(
21+
"hydrostat/ALEA",
22+
dependencies = TRUE,
23+
upgrade = "never"
24+
)
25+
```
26+
27+
If you also want the installed vignettes to be available through
28+
`utils::browseVignettes("ALEA")`, install with `build_vignettes = TRUE`:
29+
30+
``` r
31+
# install.packages("remotes")
32+
remotes::install_github(
33+
"hydrostat/ALEA",
34+
dependencies = TRUE,
35+
upgrade = "never",
36+
build_vignettes = TRUE
37+
)
38+
```
39+
40+
After installation, load the package with:
41+
42+
``` r
43+
library(ALEA)
2144
```
2245

2346
## Main features
@@ -198,6 +221,53 @@ alea_export(rl, path = "return_levels.csv")
198221
alea_export(batch, path = "batch_results", type = "all")
199222
```
200223

224+
## Learning examples
225+
226+
Teaching-oriented ALEA-R workflow scripts are available in the
227+
`examples/` folder.
228+
229+
These examples use public Paraopeba hydrological data and demonstrate
230+
common frequency-analysis workflows:
231+
232+
- single-site frequency analysis;
233+
- comparison of candidate distributions;
234+
- return levels and bootstrap confidence intervals;
235+
- goodness-of-fit, diagnostics, and AI-assisted selection;
236+
- small batch analysis;
237+
- plots and exports.
238+
239+
Run the examples from the package root directory. For example:
240+
241+
``` r
242+
source("examples/01_single_site_basic_workflow.R")
243+
```
244+
245+
The example data files are stored in:
246+
247+
``` text
248+
examples/data/
249+
```
250+
251+
Generated teaching outputs, such as exported plots and CSV files, are
252+
written to:
253+
254+
``` text
255+
examples/output/
256+
```
257+
258+
The examples are designed for learning and classroom use. They use only
259+
the public ALEA-R API and the distributions supported in the current
260+
release: `gev`, `gpa`, `pe3`, `ln2`, `ln3`, and `gum`.
261+
262+
Installed vignettes can be listed with:
263+
264+
``` r
265+
utils::browseVignettes("ALEA")
266+
```
267+
268+
When installing from GitHub, use `build_vignettes = TRUE` if you want
269+
these vignettes to be installed locally.
270+
201271
## Current limitations
202272

203273
The initial implementation does not include:
@@ -212,7 +282,8 @@ The initial implementation does not include:
212282

213283
## Citation
214284

215-
A formal package citation will be added before the first public release.
285+
Please cite ALEA-R in reports and publications where it supports the
286+
analysis.
216287

217288
``` r
218289
citation("ALEA")

0 commit comments

Comments
 (0)