filterRelation {Director} | R Documentation |
Filter source-target relationships in List for a specific type: inversely related sourcefc-targetfc pairs only (inverseFC), positively related sourcefc-targetfc pairs only (correlatedFC), negative value scores only (inverseValue), or positive value scores only (correlatedValue). Default is to not apply any filtering.
filterRelation(List, relation = c("none", "inverseFC", "correlatedFC", "inverseValue", "correlatedValue"), sourcefc = "sourcefc", targetfc = "targetfc", value = "value")
List |
Data frame containing 6 columns: source, target, description, value, sourcefc, targetfc. |
relation |
One of: none, inverseFC, correlatedFC, inverseValue, correlatedValue. Default is none. |
sourcefc |
Column name of List corresponding to sourcefcs to filter. |
targetfc |
Column name of List correspondig to targetfcs to filter. |
value |
Column name of List correspondig to value to filter. |
a filtered List.
tempList <- createList(data.frame(source=c("A","B","C"), target=c("D","E","G"), description=c("consonant","vowel","consonant"), value=runif(3,-1,1), sourcefc=runif(3,-2,2), targetfc=runif(3,-2,2))) filterRelation(tempList,"inverseValue") filterRelation(tempList,"correlatedValue") filterRelation(tempList,"inverseFC") filterRelation(tempList,"correlatedFC")