r4ds 7 summarize
The last key verb is summarise()
. It collapses a data frame to a single row:
summarise(flights, delay = mean(dep_delay, na.rm = TRUE))
summarise()
is not terribly useful unless we pair it with group_by()
.
by_day <- group_by(flights, year, month, day)
summarise(by_day, delay = mean(dep_delay, na.rm = TRUE))
ディスカッション
コメント一覧
まだ、コメントがありません