From 3146740c96746457f7a48a3c8098a2fae713193b Mon Sep 17 00:00:00 2001 From: mtennekes Date: Wed, 25 Sep 2024 09:28:40 +0200 Subject: [PATCH] fixed bivc table bug --- R/c4a_table.R | 10 +++++++--- R/onLoad.R | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/R/c4a_table.R b/R/c4a_table.R index d364fc6..2e78184 100644 --- a/R/c4a_table.R +++ b/R/c4a_table.R @@ -22,12 +22,16 @@ table_columns = function(type, show.scores) { qn = c(qn, "chroma", "hues", "contrastWT", "contrastBK", "float") qs = c(qs, "Cmax", "HwidthLR", "CRwt", "CRbk", "Blues") sn = c("HL", "HR", "Lmid") - } else { - # qn = c(qn, "nameable", "contrastWT", "contrastBK", "contrast", "float") - # qs = c(qs, "nameability", "CRwt", "CRbk", "CRmin", "Blues") + } else if (type == "cat") { qn = c(qn, "hues", "chroma", "contrastWT", "contrastBK", "equiluminance", "float", "nameable") qs = c(qs, "Hspread", "Cmax", "CRwt", "CRbk", "CRmin", "Blues", "nameability") sn = character(0) + } else if (type == "bivc") { + qn = c(qn, "chroma", "contrastWT", "contrastBK", "equiluminance", "float", "nameable") + qs = c(qs, "Cmax", "CRwt", "CRbk", "CRmin", "Blues", "nameability") + sn = character(0) + } else { + stop("Unknown type") } diff --git a/R/onLoad.R b/R/onLoad.R index 8511d25..baa7b69 100644 --- a/R/onLoad.R +++ b/R/onLoad.R @@ -193,8 +193,8 @@ do_cellspec = function(lst) { types = c("Categorical" = "cat", "Sequential" = "seq", - "Cyclic" = "cyc", "Diverging" = "div", + "Cyclic" = "cyc", "Bivariate (sequential x sequential)" = "bivs", "Bivariate (sequential x categorical)" = "bivc", "Bivariate (sequential x diverging)" = "bivd", @@ -202,8 +202,8 @@ do_cellspec = function(lst) { types1 = c("Categorical" = "cat", "Sequential" = "seq", - "Cyclic" = "cyc", "Diverging" = "div", + "Cyclic" = "cyc", "Bivariate" = "biv") types2 = list(biv = c("Sequential x sequential" = "bivs",