Skip to content

Commit

Permalink
Merge pull request #23 from MindTheGap-ERC/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
NiklasHohmann authored Oct 14, 2024
2 parents 286d6bc + f55b3b6 commit 16f16e2
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: StratPal
Title: Stratigraphic Paleobiology Modeling Pipelines
Version: 0.2.0.9001
Version: 0.3.0
Authors@R:
person("Niklas", "Hohmann", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-1559-1838"))
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ S3method(apply_niche,numeric)
S3method(apply_niche,pre_paleoTS)
S3method(apply_taphonomy,numeric)
S3method(apply_taphonomy,pre_paleoTS)
S3method(plot,pre_paleoTS)
S3method(reduce_to_paleoTS,pre_paleoTS)
export(apply_niche)
export(apply_taphonomy)
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# StratPal (development version)
# StratPal 0.3.0

* bug fix for `apply_niche` and `apply_taphonomy` for `pre_paleoTS` format

* plotting for `pre_paleoTS` fixed

# StratPal 0.2.0

Expand Down
29 changes: 29 additions & 0 deletions R/plot.pre_paleoTS.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plot.pre_paleoTS = function(x, ...){
#' @export
#'
#' @title plot pre-paleoTS objects
#'
#' @param x object
#' @param ... other arguments
#'
#' @seealso [reduce_to_paleoTS()]
#'
#' @description
#' 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
#'
#' @examples
#' \dontrun{
#' x = stasis_sl(1:4)
#' # throws error
#' plot(x)
#' library("paleoTS")
#' # correct way to plot pre-paleoTS objects
#' y = reduce_to_paleoTs(x)
#' plot(y)
#' # this plots via the procedures of the paleoTS package (which must be installed and loaded)
#' }
#'


stop("Can't plot `pre_paleoTS` objects. Convert to paleoTS format using `reduce_to_paleoTS` and plot result via the paleoTS package.")
}
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ reference:
desc: Tools for linkage with the paleoTS package
contents:
- reduce_to_paleoTS
- plot.pre_paleoTS

articles:
- title: Articles
Expand Down
32 changes: 32 additions & 0 deletions man/plot.pre_paleoTS.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 16f16e2

Please sign in to comment.