filterRelation {Director}R Documentation

filterRelation

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

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

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")

[Package Director version 1.6.0 Index]