Skip to content
Snippets Groups Projects
Commit 29e4e00a authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix plotting mortality trends (leave out reference if not given, otherwise the...

Fix plotting mortality trends (leave out reference if not given, otherwise the code will try to access NULL)
parent d8adcdc7
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,11 @@ ...@@ -60,7 +60,11 @@
#' @export #' @export
plot.mortalityTable = function(x, ..., reference = NULL, trend = FALSE) { plot.mortalityTable = function(x, ..., reference = NULL, trend = FALSE) {
if (!missing(trend) && isTRUE(trend)) { if (!missing(trend) && isTRUE(trend)) {
plotMortalityTrend(x, ..., reference = reference) if (!missing(reference) && !is.null(reference)) {
plotMortalityTrend(x, ..., reference = reference)
} else {
plotMortalityTrend(x, ...)
}
} else if (!missing(reference) && !is.null(reference)) { } else if (!missing(reference) && !is.null(reference)) {
plotMortalityTableComparisons(x, ..., reference = reference) plotMortalityTableComparisons(x, ..., reference = reference)
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment