labels_cleaner <- function(x) {
nodisplay <- c('IOS','ANDROID','BACKEND')
if (length(x) == 1) {
if (str_to_upper(x[[1]]) %in% nodisplay) {
main_label <- NA
} else {
main_label <- str_to_title(x[[1]])
}
} else if (length(x) > 1) {
first <- x[[1]]
second <- x[[2]]
main_label <- ifelse(str_to_upper(first) %in% nodisplay,str_to_title(second),str_to_title(first))
}
main_label <- unlist(main_label)
return(main_label)
}
components_cleaner <- function(x) {
first_choice <- c('Brokerage','Apple Pay','Multibanking')
if (length(x) == 1) {
main_label <- str_to_title(x[[1]])
} else if (length(x) > 1) {
first <- x[[1]]
second <- x[[2]]
main_label <- ifelse(second %in% first_choice,str_to_title(second),str_to_title(first))
}
main_label <- unlist(main_label)
return(main_label)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.