From 19016037302814387799426fc40b318ee54b07f0 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 14 Apr 2023 20:26:50 +0200 Subject: Dont fix mean_degparms if it does not exist --- R/plot.mixed.mmkin.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'R') diff --git a/R/plot.mixed.mmkin.R b/R/plot.mixed.mmkin.R index 466e55fc..d6c3d0de 100644 --- a/R/plot.mixed.mmkin.R +++ b/R/plot.mixed.mmkin.R @@ -166,10 +166,12 @@ plot.mixed.mmkin <- function(x, } } - # Make sure degparms_pop is a matrix, columns corresponding to population curve(s) - if (is.null(dim(degparms_pop))) { - degparms_pop <- matrix(degparms_pop, ncol = 1, - dimnames = list(names(degparms_pop), "Population")) + if (pop_curves) { + # Make sure degparms_pop is a matrix, columns corresponding to population curve(s) + if (is.null(dim(degparms_pop))) { + degparms_pop <- matrix(degparms_pop, ncol = 1, + dimnames = list(names(degparms_pop), "Population")) + } } degparms_fixed <- fit_1$fixed$value -- cgit v1.2.1