Learn R Programming

tm.plugin.mail (version 0.3-2)

removeCitation: Remove E-Mail Citations

Description

Remove citations, i.e., lines beginning with >, from an e-mail message.

Usage

removeCitation(x, ...)
# S3 method for MailDocument
removeCitation(x, ...)
# S3 method for character
removeCitation(x, removeQuoteHeader = FALSE, ...)

Arguments

x

A mail document or character vector.

removeQuoteHeader

a logical indicating if the quotation header (of the type “On date, author wrote:”) that proceeds the quoted message should be removed.

...

arguments to be passed to or from methods.

Author

Ingo Feinerer

See Also

removeMultipart to remove non-text parts from multipart e-mail messages, and removeSignature to remove signature lines from e-mail messages.

Examples

Run this code
require("tm")
newsgroup <- system.file("mails", package = "tm.plugin.mail")
news <- VCorpus(DirSource(newsgroup),
                readerControl = list(reader = readMail))
news[[8]]
removeCitation(news[[8]])
removeCitation(news[[8]], removeQuoteHeader = TRUE)

Run the code above in your browser using DataLab