View source: R/func__extractPairedRows.R
extractPairedRows | R Documentation |
Assuming a data frame with a column storing pair IDs, this function extracts rows sharing the same pair IDs from the data frame. It can be used to isolate symmetric associations from asymmetric associations. Specifically, a pair of random variables X and Y is considered as in a symmetric association if both models Y ~ X and X ~ Y display a significant effect of the explanatory variable, respectively. On the contrary, X and Y is in an asymmetric association if either model shows insignificance.
extractPairedRows(x, pair.col = "pair")
x |
A data frame containing pair IDs. |
pair.col |
A character or integer specifying which column is providing pair IDs. |
Yu Wan (wanyuac@126.com)
a <- rbind.data.frame(subset(assoc[["assoc"]], score >= 1.5 | (s_d == 1 & dif == 0)), stringsAsFactors = FALSE) ap <- extractPairedRows(x = a, pair.id = "pair")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.