Skip to content

Commit 7214374

Browse files
authored
Merge pull request #40 from Boehringer-Ingelheim/317829-incorrect_yn_map
fix yn mapping
2 parents 3905f6a + 0c8d6ed commit 7214374

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/dressing_room.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,11 @@ T_do_map <- function(datasets, action) {
279279

280280
mapped_from <- class(col_data)
281281

282-
attrs <- attributes(col_data)
282+
attrs <- attributes(col_data)
283283
if (kind == "logical" && T_is_of_kind(col_data, T_YN())) {
284+
if (is.factor(col_data)) {
285+
attrs <- attrs[!names(attrs) %in% c("levels", "class")]
286+
}
284287
col_data <- (col_data == "Y")
285288
} else {
286289
kind_s <- T_get_type_as_text(kind)

0 commit comments

Comments
 (0)