Description Usage Arguments Value Examples
Convert a raw matrix or dataframe to proportions/percents. Divides each element of a column by the column sum.
1 |
mat |
A numeric matrix or dataframe. |
digits |
Integer; number of decimal places to round. |
percent |
logical. If |
by.column |
logical. If |
round |
logical. If |
Returns a matrix with proportionally scaled values.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
y <- wfdf(DATA$state, DATA$person, stopwords = c("your", "yours"),
margins = TRUE)
prop(wfm(y), 4)[1:10, ] #as a proportion
prop(wfm(y), 4, TRUE)[1:10, ] #as a percentage
heatmap(prop(wfm(y), 4))
wdstraj <- word_stats(rajSPLIT$dialogue, rajSPLIT$person)
prop(wdstraj$gts[, -1], 5)[1:15, 1:6]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.