Description Usage Arguments Value Examples
View source: R/term_selection.R
Given a character vector of document information, creates a document-feature matrix.
1 | create_dfm(elements, features)
|
elements |
a character vector of document information (e.g. document titles or abstracts) |
features |
a character vector of terms to use as document features (e.g. keywords) |
a matrix with documents as rows and terms as columns
1 2 3 4 5 6 7 8 9 10 11 | dfm <- create_dfm(
elements = c(
"Cross-scale occupancy dynamics of a postfire specialist
in response to variation across a fire regime",
"Variation in home-range size of Black-backed Woodpeckers",
"Black-backed woodpecker occupancy in burned and beetle-killed forests"
),
features = c("occupancy", "variation", "black-backed woodpecker", "burn")
)
as.matrix(dfm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.