Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #23

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Dev #23

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading