Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (10 sloc) 303 Bytes
top10 <- function(filename) {
loadedData <- scan(filename, character(), sep="\n")
loadedDataTable <- table(loadedData)
loadedDataSorted <- sort(loadedDataTable, decreasing=TRUE)
return(loadedDataSorted[1:10])
}
top10plot <- function(filename) {
top10data <- top10(filename)
plot(top10data)
}