removeCitation: Remove E-Mail Citations

Description Usage Arguments Author(s) See Also Examples

View source: R/mail.R

Description

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

Usage

1
2
## S3 method for class 'MailDocument'
removeCitation(x, ...)

Arguments

x

A mail document.

...

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

Author(s)

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

1
2
3
4
5
6
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)

Example output

Loading required package: tm
Loading required package: NLP
<<MailDocument>>
Metadata:  9
Content:  chars: 1108
<<MailDocument>>
Metadata:  9
Content:  chars: 312
<<MailDocument>>
Metadata:  9
Content:  chars: 229

tm.plugin.mail documentation built on May 29, 2017, 11:44 p.m.