Вы можете попробовать с хорошим ggalluvial пакетом:
library(ggalluvial)
library(ggplot2)
# some fake data
data <- data.frame(column1 = c('A','A','A','B','B','B')
,column2 = c('C','D','E','C','D','E')
, column3 = c('F','G','H','I','J','K')
)
# add a costant as frequencies: if each "flow" count as 1, you can do this
data$freq <- 1
# here the plot
ggplot(data,
aes(y = freq, axis1 = column1, axis2 = column2, axis3 = column3)) +
geom_alluvium(aes(), width = 1/12) +
geom_stratum(width = 1/12, fill = "black", color = "blue") +
geom_label(stat = "stratum", label.strata = TRUE) +
scale_fill_brewer(type = "qual", palette = "Set1") +
ggtitle("nice sankey")