unique_pairs | R Documentation |
tidy_colo_dtm
tidy_colo_dtm
utilizes the entire matrix to generate
the tidied data.frame. This means that the upper and lower triangles are
used redundantly. This function eliminates this redundancy by dropping one
set of the pairs from a tidied data.frame.
unique_pairs(x, col1 = "term_1", col2 = "term_2", ...)
## Default S3 method:
unique_pairs(x, col1 = "term_1", col2 = "term_2", ...)
## S3 method for class 'data.table'
unique_pairs(x, col1 = "term_1", col2 = "term_2", ...)
x |
A |
col1 |
A string naming column 1. |
col2 |
A string naming column 2. |
... |
ignored. |
Returns a filtered data.frame
.
tidy_colo_dtm
dat <- data.frame(
term_1 = LETTERS[1:10],
term_2 = LETTERS[10:1],
stringsAsFactors = FALSE
)
unique_pairs(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.