From 35f122798f336f7139ce2484ab785b092abc1723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20M=C3=BCller-Schee=C3=9Fel?= Date: Sun, 18 Feb 2024 17:18:46 +0100 Subject: [PATCH] Update input_functions.R According to issue. --- R/input_functions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/input_functions.R b/R/input_functions.R index aa8538f..3fee621 100644 --- a/R/input_functions.R +++ b/R/input_functions.R @@ -133,6 +133,7 @@ prep.life.table=function(x, dec = NA, agebeg, ageend = NA, group = NA, method = if(!is.na(group)){ # Change the names of group for further processes to "Group". names(asd)[which(names(asd)==group)]="Group" + if (any(is.na(asd$Group))){stop("NA in grouping variable not allowed.")} # Create a dataframe (restab) filled with zeros, # with the column count of the grouping columns (+2)