From 03584c0acb2b8c0fdc014a2c5e4efc631894ca14 Mon Sep 17 00:00:00 2001 From: Ghos_h <509036+soumyabrataghosh@users.noreply.github.com> Date: Fri, 21 Jun 2019 15:36:12 +0200 Subject: [PATCH] Better clarification of Error Notification `tme` and `adj.var` are not necessarily a matrix. --- R/form_models.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/form_models.R b/R/form_models.R index 628be61..a65d239 100644 --- a/R/form_models.R +++ b/R/form_models.R @@ -49,7 +49,7 @@ build_study = function(data, grp = NULL, adj.var = NULL, bio.var = NULL, if (is.matrix(tme) | is.vector(tme)) { tme <- data.frame(tme) } else { - stop("tme must be a matrix") + stop("tme must be a vector or a matrix") } # intercept <- !apply(tme, 2, var) # tme <- subset(tme, select=!intercept) @@ -58,7 +58,7 @@ build_study = function(data, grp = NULL, adj.var = NULL, bio.var = NULL, if (is.matrix(adj.var) | is.vector(adj.var) | is.factor(adj.var)) { adj.var <- data.frame(adj.var) } else { - stop("adj.var must be a matrix") + stop("adj.var must be a vector or a matrix") } #intercept <- !apply(adj.var, 2, var) # adj.var <- subset(adj.var, select=!intercept)