Commit 29e4e00a authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

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
......@@ -60,7 +60,11 @@
#' @export
plot.mortalityTable = function(x, ..., reference = NULL, trend = FALSE) {
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)) {
plotMortalityTableComparisons(x, ..., reference = reference)
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment