Skip to content

Commit

Permalink
expanded documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasHohmann committed May 2, 2024
1 parent b1ce826 commit c78b26a
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vignettes/stratcols.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,13 @@ s2 = rename_facies(s, new_names = c(2,3))
plot(s2)
```
The optional argument `old_names` can be used to replace specific facies.

## Further reading

See also

```{r}
vignette("stratcols_doc")
```

for an explanation of the larger structure of the package and definitions of the classes.
99 changes: 99 additions & 0 deletions vignettes/stratcols_doc.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: "Structure and classes of the admtools package"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{stratcols_doc}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(stratcols)
```

## Introduction

This vignette provides an overview of the structure of the `stratcols` package and the classes used therein.

## S3 classes

### S3 class `stratcol`

#### Description

The S3 class `stratcol` represents a simple **strat**igraphic **col**umn. Structurally, they are lists with 3 fields:

- `bdry` : numeric vector, boundary of beds or units in the stratigraphic column

- `fa` : vector, facies names of the beds

- `L_unit` : `NULL` or a string, length unit of the bed thickness

The fields have the following constraints: `fa` must have exactly one element less than `bdry`. `bdry` must have at least 2 elements.

#### Construction

The following functions construct `stratcol` objects:

- `as_stratcol` : standard constructor

#### Logic

The following functions examine the logic of `stratcol` objects:

- `is_stratcol` : is an object a valid `stratcol` object?

#### Representation

- `plot.stratcol` for basic plotting. Wraps the `StratigrapheR` package.

#### Modification

The following functions modify existing `stratcol` objects:

- `set_L_unit` to set length unit

#### Extracting information

The following functions extract information from `stratcol` objects:

- `bed_thickness`

- `facies_names` : get facies names of all beds

- `facies_repetitions` : are there successive beds with identical facies?

- `get_base` : position of lowest bed boundary

- `get_L_unit` : extract length unit

- `merge_beds` : combine beds in stratigraphic column

- `no_beds` : number of beds in column

- `no_facies` number of distinct facies in column

- `unique_facies_names` : get unique names of facies

#### Transformation

The following functions transform `stratcol` objects:

- `rename_facies` : change facies names

## Further reading

See also

```{r}
vignette("stratcols")
```

for a standard workflow and usage.

0 comments on commit c78b26a

Please sign in to comment.