Skip to content

Commit 16f16e2

Browse files
Merge pull request #23 from MindTheGap-ERC/dev
Dev
2 parents 286d6bc + f55b3b6 commit 16f16e2

File tree

6 files changed

+69
-2
lines changed

6 files changed

+69
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: StratPal
22
Title: Stratigraphic Paleobiology Modeling Pipelines
3-
Version: 0.2.0.9001
3+
Version: 0.3.0
44
Authors@R:
55
person("Niklas", "Hohmann", , "N.H.Hohmann@uu.nl", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-1559-1838"))

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ S3method(apply_niche,numeric)
44
S3method(apply_niche,pre_paleoTS)
55
S3method(apply_taphonomy,numeric)
66
S3method(apply_taphonomy,pre_paleoTS)
7+
S3method(plot,pre_paleoTS)
78
S3method(reduce_to_paleoTS,pre_paleoTS)
89
export(apply_niche)
910
export(apply_taphonomy)

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# StratPal (development version)
1+
# StratPal 0.3.0
2+
3+
* bug fix for `apply_niche` and `apply_taphonomy` for `pre_paleoTS` format
4+
5+
* plotting for `pre_paleoTS` fixed
26

37
# StratPal 0.2.0
48

R/plot.pre_paleoTS.R

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
plot.pre_paleoTS = function(x, ...){
2+
#' @export
3+
#'
4+
#' @title plot pre-paleoTS objects
5+
#'
6+
#' @param x object
7+
#' @param ... other arguments
8+
#'
9+
#' @seealso [reduce_to_paleoTS()]
10+
#'
11+
#' @description
12+
#' This functions throws an error on purpose, as `pre_paleoTS` objects can not be plotted directly. To plot them, first use `reduce_to_paleoTS` and use `plot` on the results
13+
#'
14+
#' @examples
15+
#' \dontrun{
16+
#' x = stasis_sl(1:4)
17+
#' # throws error
18+
#' plot(x)
19+
#' library("paleoTS")
20+
#' # correct way to plot pre-paleoTS objects
21+
#' y = reduce_to_paleoTs(x)
22+
#' plot(y)
23+
#' # this plots via the procedures of the paleoTS package (which must be installed and loaded)
24+
#' }
25+
#'
26+
27+
28+
stop("Can't plot `pre_paleoTS` objects. Convert to paleoTS format using `reduce_to_paleoTS` and plot result via the paleoTS package.")
29+
}

_pkgdown.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ reference:
4444
desc: Tools for linkage with the paleoTS package
4545
contents:
4646
- reduce_to_paleoTS
47+
- plot.pre_paleoTS
4748

4849
articles:
4950
- title: Articles

man/plot.pre_paleoTS.Rd

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)