Learn R Programming

tm.plugin.mail (version 0.0-1)

removeSignature: Remove E-Mail Signatures

Description

Remove signature lines from an e-mail message.

Usage

## S3 method for class 'MailDocument':
removeSignature(x, marks = character(0))

Arguments

x
A mail document.
marks
Signature identifications marks (in form of regular expression patterns). Note that the official signature start mark -- (dash dash blank) is always considered.

See Also

removeCitation to remove e-mail citations, and removeMultipart to remove non-text parts from multipart e-mail messages.

Examples

Run this code
require("tm")
newsgroup <- system.file("mails", package = "tm.plugin.mail")
news <- Corpus(DirSource(newsgroup), readerControl = list(reader = readMail))
news[[5]]
removeSignature(news[[5]], marks = "^[+]-*[+]$")

Run the code above in your browser using DataLab