krackhardt_datasets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
krackhardt_datasets [2019/12/04 09:01] – [Using cutree] hkimscil | krackhardt_datasets [2019/12/13 13:47] – hkimscil | ||
---|---|---|---|
Line 65: | Line 65: | ||
< | < | ||
- | krack_friend <- delete.edges(krack_full, | + | krack_friend <- delete_edges(krack_full, |
summary(krack_friend) | summary(krack_friend) | ||
krack_friend[] | krack_friend[] | ||
- | krack_advice <- delete.edges(krack_full, | + | krack_advice <- delete_edges(krack_full, |
summary(krack_advice) | summary(krack_advice) | ||
krack_advice[] | krack_advice[] | ||
- | krack_reports_to <- delete.edges(krack_full, | + | krack_reports_to <- delete_edges(krack_full, |
summary(krack_reports_to) | summary(krack_reports_to) | ||
krack_reports_to[] | krack_reports_to[] | ||
Line 213: | Line 213: | ||
< | < | ||
- | # Next, we'll use the same procedure to add social-interaction | + | # Next, we'll use the same procedure to add advice |
# information. | # information. | ||
krack_advice_matrix_row_to_col <- get.adjacency(krack_advice, | krack_advice_matrix_row_to_col <- get.adjacency(krack_advice, | ||
Line 230: | Line 230: | ||
krack_reports_to_advice_matrix | krack_reports_to_advice_matrix | ||
</ | </ | ||
+ | |||
+ | < | ||
+ | krack_friend_matrix_row_to_col <- get.adjacency(krack_friend, | ||
+ | krack_friend_matrix_row_to_col | ||
+ | |||
+ | # To operate on a binary graph, simply leave off the " | ||
+ | # parameter: | ||
+ | krack_friend_matrix_row_to_col_bin <- get.adjacency(krack_friend) | ||
+ | krack_friend_matrix_row_to_col_bin | ||
+ | |||
+ | # For this lab, we'll use the valued graph. The next step is to | ||
+ | # concatenate it with its transpose in order to capture both | ||
+ | # incoming and outgoing task interactions. | ||
+ | krack_friend_matrix_col_to_row <- t(as.matrix(krack_friend_matrix_row_to_col)) | ||
+ | krack_friend_matrix_col_to_row | ||
+ | |||
+ | krack_friend_matrix <- rbind(krack_friend_matrix_row_to_col, | ||
+ | krack_friend_matrix | ||
+ | </ | ||
+ | |||
< | < |
krackhardt_datasets.txt · Last modified: 2019/12/13 14:11 by hkimscil