## The function is currently defined as
function (tmpMatrix, wordClass, breaks)
{
freqDist <- matrix(0, nrow = length(breaks) - 1, ncol = ncol(tmpMatrix))
for (tmp in rownames(tmpMatrix)) {
cat <- wordClass[tmp]
if (!is.na(cat)) {
freqDist[cat, ] <- freqDist[cat, ] + tmpMatrix[tmp,
]
}
}
colnames(freqDist) <- colnames(tmpMatrix)
if (!is.null(names(breaks))) {
rownames(freqDist) <- names(breaks)[2:length(breaks)]
}
return(freqDist)
}
Run the code above in your browser using DataLab