From 8dcd429dba242ce400a9673e28fbb79aa469b6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Biecek?= Date: Sat, 6 Jun 2020 23:28:55 +0200 Subject: [PATCH] fixed warning with label --- R/plot_aggregated_profiles.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/R/plot_aggregated_profiles.R b/R/plot_aggregated_profiles.R index 62ac4b28..e5107198 100644 --- a/R/plot_aggregated_profiles.R +++ b/R/plot_aggregated_profiles.R @@ -137,10 +137,7 @@ plot.aggregated_profiles_explainer <- function(x, ..., # If null add subtitle if (is.null(subtitle)){ # get model names and classes - model_name <- c() - for (i in seq_along(dfl)){ - model_name[i] <- paste(unique(dfl[[i]]$`_label`), collapse = ", ", sep = ",") - } + model_name <- unique(unlist(sapply(dfl, function(tmp) tmp$`_label`))) subtitle_models <- paste(model_name, collapse = ", ", sep = ",") subtitle <- paste("Created for the", subtitle_models, "model") }