coincidence.graph: Create a coincidence graph

Description Usage Arguments Value Examples

Description

Create a graph from conversation data

Usage

1
2
coincidence.graph(participation.id, author,
  similarity.measure = "coincidence_count")

Arguments

conversation.id

A vector representing the conversation authors were engaged in (e.g. a thread, meeting)

author

A vector with unique author names/ids

Value

A graph object in the igraph format

Examples

1
2
3
4
5
6
7
8
9
d = data.frame(conversation=c(1,1,1,1,1,1,2,2,2,2),
              author=c('Alice','Bob','Alice','Dave','Bob','Bob','Alice','Bob','Alice','Bob'),
              order.nr=c(1,2,3,4,5,6,1,2,3,4))
g = author.coincidence.graph(d$conversation, d$author) # In how many conversations did author.X and author.Y communicate?
plot(g, edge.label=E(g)$weight, vertex.size=V(g)$n.documents*25)
g = author.coincidence.graph(d$conversation, d$author, 'overlap_jacard') # Similar to default (coincidence_count) but with direction (by dividing coincidence by number of conversations author participated in)
plot(g, edge.label=E(g)$weight, vertex.size=V(g)$n.messages*15)
g = author.coincidence.graph(d$conversation, d$author, 'cosine') # Cosine can be used to also take into account how many times each author participated within conversations
plot(g, edge.label=E(g)$weight, vertex.size=V(g)$n.messages*15)

kasperwelbers/network-tools documentation built on May 20, 2019, 7:38 a.m.