removeDictionaryEntry: Remove An Entry From A Dictionary Data.Frame

Description Usage Arguments Examples

Description

This function searches by key or val and removes any dictionary entries associated with those values. It will process the "key" before the "val", not that that should matter. Warning: This function will remove any blank entries, if you have them.

Usage

1
removeDictionaryEntry(mydic, key = "", val = "")

Arguments

mydic

A data.frame containing a column "key" and a column "val". "key", in particular, should be formatted with < and > surrounding any key name.

key

Initially left "", setting this will let the function search in the key column for any matching value to remove.

val

Initially left "", setting this will let the function search in the val column for any matching value to remove.

Examples

1
2
3
mydic <- data.frame(key=c("<tigers>", "<tigers>", "<lions>", "<lions>"), val=c("a", "b", "c", "d"), stringsAsFactors=F)
removeDictionaryEntry(mydic, key="tigers")
removeDictionaryEntry(mydic, val="b")

ecology-rocks/grammaR documentation built on May 15, 2019, 7:58 p.m.