Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
データフレームから頻度でソートされたリストを取得しようとしています。
data <- read.csv('ads.csv') write.table(summary(data$Publication.Name), quote = FALSE, sep = ",")
summary() が実際に周波数を取得する最良の方法であるかどうかはわかりませんが、より良い方法を受け入れています。これを最も頻繁に最初に並べ替えるにはどうすればよいですか?
たとえばtable、
table
yourdata <- sample(1:10,100,replace=T) x <- sort(table(yourdata),decreasing=T) write.csv(x,"mytable.csv",quote=F)