filterRelation: filterRelation

Description Usage Arguments Value Examples

View source: R/functions.R

Description

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.

Usage

1
2
3
filterRelation(List, relation = c("none", "inverseFC", "correlatedFC",
  "inverseValue", "correlatedValue"), sourcefc = "sourcefc",
  targetfc = "targetfc", value = "value")

Arguments

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.

Value

a filtered List.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

Director documentation built on Nov. 8, 2020, 5:55 p.m.