I have this code to print a plot:
predictors <- c(
  data[c("setting", "province", "years_practicing", "physician_responsibilities", "medical_center", "gender", "training", "treat_epilepsy", "specialty", "outpatient"
  )])

lapply(names(predictors), function(x) {
  lapply(names(predictors), function(y) {
    if (x != y) {
      single_plot <- ggplot(as.data.frame(data), aes(predictors[[x]], fill = predictors[[y]])) +
        geom_bar(position = position_fill(reverse = TRUE)) +
        geom_text(color = 'white', aes(label = paste0(after_stat(count), ' (', scales::percent(..count.. / tapply(..count.., ..x.., sum)[as.character(..x..)]), ')')), stat = "count", position = position_fill(vjust = 0.5, reverse = TRUE)) +
        scale_fill_grey(start = 0.75, end = 0.15, name = "Physician response") +
        xlab(paste0(names_hash[[x]])) +
        ylab(paste0(names_hash[[y]])) +
        guides(color = guide_legend(reverse = TRUE)) +
        theme(
          axis.text.y = element_blank(),
          axis.ticks.y = element_blank(),
          axis.ticks.x = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
        ) +
        scale_x_discrete(na.translate = FALSE)

      ggsave(paste0("output/06_demographics/", y, "_VS_", x, ".png"), single_plot, width = 16, height = 8, dpi = 150)
    }
  })
})

The x and y are categorical, and sometimes ordered. How do I append SIG_ to the beginning  of the output file if it passes a test of significance? Also please decide the best te Give two different versions of responses. Please separate the responses with 6 asterisk symbols: ******.
user