Last active
November 19, 2018 12:28
-
-
Save kawasaki2013/1b62b6ce6c5af03ecd995df152d36585 to your computer and use it in GitHub Desktop.
小説 不思議の国のアリス ワードリスト(頻度上位50位まで)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 分析データ | |
| library(languageR) | |
| data(alice) | |
| # 全ての文字を小文字に変換 | |
| alice.lower <- tolower(alice) | |
| # ワードリストの作成 | |
| freq.list <- table(alice.lower) | |
| sorted.freq.list <- sort(freq.list, decreasing = TRUE) | |
| sorted.table <- paste(names(sorted.freq.list), sorted.freq.list, sep = ": ") | |
| # ワードリスト(頻度上位50位まで)の確認 | |
| head(sorted.table, 50) |
Author
kawasaki2013
commented
Nov 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment