Description Usage Arguments Value Examples
This function is used to remove any rows in a data.frame with repeated elements. It is necessary in grammaR because if we have two keys with the value "said" in the dictionary, one will override the other when we do things like spin a story up from plain text.
1 | getUniques(df, colname = "val")
|
df |
The data.frame to check; should have a column named "val" or a character value in "colname" parameter. |
colname |
The name of the column to search and clean by. |
This function returns a data.frame with only unique values. It also removes any stray "|" symbols.
1 2 3 4 | ## removing uniques, cleaning out | symbols
sampleDf <- data.frame(key=c("<rubber>", "<joy>", "<hangar>"),
val=c("farm", "farm", "toys |"), stringsAsFactors=F)
getUniques(sampleDf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.