大仰な。
kanji <- c("黄","紫","青","赤","緑") x <- paste(kanji, collapse = " ") write(as.character(x), file = "hoge.txt" ) library(RMeCab) y <- RMeCabText("hoge.txt") yomi <- numeric(length(y)) for(i in 1:length(y)){ yomi[i] <- y[[i]][9] } kanji[order(yomi)] file.remove("hoge.txt")