Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

noise

detect noise


Description

detect noise

Usage

noise(.Object, ...)

## S4 method for signature 'DocumentTermMatrix'
noise(
  .Object,
  minTotal = 2,
  minTfIdfMean = 0.005,
  sparse = 0.995,
  stopwordsLanguage = "german",
  minNchar = 2,
  specialChars = getOption("polmineR.specialChars"),
  numbers = "^[0-9\\.,]+$",
  verbose = TRUE
)

## S4 method for signature 'TermDocumentMatrix'
noise(.Object, ...)

## S4 method for signature 'character'
noise(
  .Object,
  stopwordsLanguage = "german",
  minNchar = 2,
  specialChars = getOption("polmineR.specialChars"),
  numbers = "^[0-9\\.,]+$",
  verbose = TRUE
)

## S4 method for signature 'textstat'
noise(.Object, p_attribute, ...)

Arguments

.Object

an .Object of class "DocumentTermMatrix"

...

further parameters

minTotal

minimum colsum (for DocumentTermMatrix) to qualify a term as non-noise

minTfIdfMean

minimum mean value for tf-idf to qualify a term as non-noise

sparse

will be passed into "removeSparseTerms" from "tm"-package

stopwordsLanguage

e.g. "german", to get stopwords defined in the tm package

minNchar

min char length ti qualify a term as non-noise

specialChars

special characters to drop

numbers

regex, to drop numbers

verbose

logical

p_attribute

relevant if applied to a textstat object

Value

a list


polmineR

Verbs and Nouns for Corpus Analysis

v0.8.5
GPL-3
Authors
Andreas Blaette [aut, cre] (<https://orcid.org/0000-0001-8970-8010>), Christoph Leonhardt [ctb]
Initial release
2020-09-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.