delete_words {MetaNLP} | R Documentation |
Delete list of words
Description
There can be words that do not offer additional information in the classification whether a paper should be included or excluded from a meta-analysis. Thus, such words should not be part of the word count matrix. This function allows the user to remove these columns of the word count matrix by specifying a vector of words to delete.
Usage
delete_words(object, delete_list)
## S4 method for signature 'MetaNLP,character'
delete_words(object, delete_list)
Arguments
object |
A MetaNLP object, whose data frame is to be modified |
delete_list |
A character vector containing the words to be deleted |
Details
The words in delete_list
can be given like they appear in the
text. They are lemmatized and stemmed by delete_words
to match the
columns of the word count matrix.
Value
An object of class MetaNLP
Examples
path <- system.file("extdata", "test_data.csv", package = "MetaNLP", mustWork = TRUE)
obj <- MetaNLP(path)
del_words <- c("beautiful", "considering", "found")
obj <- delete_words(obj, del_words)
[Package MetaNLP version 0.1.2 Index]