Description Usage Arguments Examples
View source: R/transform2social.R
Function for transforming an edgelist consisting of affiliaiton data to an edgelist containing association data. The resulting edgelist generates edge weights that correspond to the number of shared activities
1 | transform2social(edgelist)
|
edgelist |
a dataframe that contains a list of people and their associated activities. The first column should list the name of the source node; the second column should list associated activities. |
1 2 3 4 5 6 7 8 9 10 | # minimal example
agents <- c("Bill", "Bill", "Bill", "Bob", "Bob", "Bob", "John", "John")
activities <- c("Act1","Act2", "Act3","Act1", "Act2","Act4","Act3","Act4")
affiliations <- data.frame(agents, activities)
transform2social(edgelist = affiliations)
# FM 3-24 example affiliation matrix
data("fm3_24_affiliation")
affiliations <- as.data.frame(fm3_24_affiliation)
transform2social(edgelist = affiliations)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.