#パッケージの読み込み library("alluvial") ###データ例の作成##### n <- 100 TestData <- data.frame("Group" = sample(paste0("Group", 1:3), n, replace = TRUE), "Schar" = sample(letters[1:10], n, replace = TRUE), "Bchar" = sample(LETTERS[1:10], n, replace = TRUE), "Count" = sample(c(0, 1), n, replace = TRUE)) ######## #aggregateコマンドでデータを集計 PlotData <- aggregate(formula = Count~Group+Schar+Bchar, data = TestData, FUN =