createedges: Create edgelist from forest (result of 'makeforest')

Description Usage Arguments Value Author(s) Examples

Description

Create edgelist from forest (result of makeforest).

Usage

1
createedges(forest,subjectfilter,contentfilter,lv)

Arguments

forest

A matrix with five colums. Result of makeforest

subjectfilter

A regular expression. An edgelist of all people who used subjectfilter in the subject will be created.

contentfilter

A regular expression. An edgelist of all people who used contentfilter in the content will be created.

lv

What line values should represent. nom ("number of mails") if the line value should represent the number of mails (equals 1). d if line value should represent the inverse of the distance of the two authors in the time tree.

Value

A matrix with a maximum of six columns. First column contains author of the mail. Second column contains an author of a mail written before. Third column contains the line value. Forth column contains the thread ID of the thread in which the e-mail was sent. Fifth column contains the subject. Sixth column contains the content.

Author(s)

Angela Bohn angela.bohn at gmail.com

Examples

1
2
3
4
5
6
7
8
9
forest <- rbind(
c(1,1,"PersonA","[R] Question on rhelp","Hello, I have a question...")
,c(2,1,"PersonB","[R] Question on rhelp","This is the answer")
,c(3,2,"PersonC","[R] Question on rdevel","Dear all,...")
,c(4,2,"PersonD","[R] Question on rdevel","Answer")
)
colnames(forest) <- c("EMailID","ThreadID","Author","Subject","Content")
createedges(forest,subjectfilter="rhelp")
createedges(forest,contentfilter="[A|a]nswer")

snatm documentation built on May 2, 2019, 5:01 p.m.

Related to createedges in snatm...