Learn R Programming

MetaNLP (version 0.1.4)

delete_words: 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 document-term 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 MetaNLP,character delete_words(object, delete_list)

Value

An object of class MetaNLP

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 document-term matrix.

Examples

Run this code
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)


Run the code above in your browser using DataLab