filterSubset {Director} | R Documentation |
Filter up to two qualitative columns (source and target) in List for a subset of names.
filterSubset(List, sourceSubset = NULL, targetSubset = NULL, invert = FALSE, source = "source", target = "target", join = c("union", "intersect"))
List |
Data frame containing 6 columns: source, target, description, value, sourcefc, targetfc. |
sourceSubset |
Vector of source names to keep. |
targetSubset |
Vector of target names to keep. |
invert |
Take the inverse selection of defined subset. |
source |
Column name of List containing source names. |
target |
Column name of List containing target names. |
join |
If both subsets are defined, take either union or intersect of subsets found. |
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))) filterSubset(tempList,source="source", target="description", sourceSubset="C", targetSubset="consonant") filterSubset(tempList,target="description", targetSubset="consonant") filterSubset(tempList,target="description", targetSubset="consonant", invert=TRUE)