Name: frqTable
Scenario: Want exchange data to Excel, or do the long tail fit
Code:
frqTable <- function(aFactorCol, aColName, aIsDecs="TRUE"){
ret <- as.data.frame(table(aFactorCol))
colnames(ret) <- c(aColName,'frq')
ret <- ret[order(ret$frq,decreasing=aIsDecs),]
rownames(ret) <- NULL
return (ret);
}
No comments:
Post a Comment