From c931057ce8f05d3a0dfefea72b73903efb82e900 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 8 May 2023 08:44:36 +0200 Subject: Fix obtaining endpoints for user defined covariate values --- R/endpoints.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'R') diff --git a/R/endpoints.R b/R/endpoints.R index 0aafd728..c3e0a0d3 100644 --- a/R/endpoints.R +++ b/R/endpoints.R @@ -49,7 +49,10 @@ endpoints <- function(fit, covariates = NULL, covariate_quantile = 0.5) { apply(fit$covariates, 2, quantile, covariate_quantile, simplify = FALSE)) } else { - covariates <- data.frame("User" = covariates) + covariate_m <- matrix(covariates, byrow = TRUE) + colnames(covariate_m) <- names(covariates) + rownames(covariate_m) <- "User" + covariates <- as.data.frame(covariate_m) } degparms_trans <- parms(fit, covariates = covariates)[, 1] if (inherits(fit, "saem.mmkin") & (fit$transformations == "saemix")) { -- cgit v1.2.1