R - TopN Analysis

Card Puncher Data Processing

About

Ordinal Data - TopN (Analysis|Function)

Package

data.frame

  • One column
head(sort(du20150915Qas$size,decreasing=TRUE), n = 10)
  • All column
head(data.frame[order(data.frame$name, decreasing= T),], n = 10)

plyr

R - Dplyr (Data Frame Operations)

library(plyr)
head(arrange(data.frame,desc(name)), n = 10)

data.table

the first two rows for each month with a R - Data Table

ans <- flights[, head(.SD, 2), by = month]







Share this page:
Follow us:
Task Runner