WFS_util_keep_unique | R Documentation |
Keep first or last entry of list entries with duplicated names
WFS_util_keep_unique(mylist, keep_first = T, ignore.case = T)
mylist |
A named list |
ignore.case |
Logical scalar indicating if case is ignored when comparing for duplicate names |
keep.first |
Logical scalar indicating if the first (when |
A copy of mylist
with duplicate names removed (apart from the first when keep_first=TRUE
or last otherwise )
L <- list( a = 1, A = 2, aA = 3, Aa = 4) WFS_util_keep_unique(L,keep_first = T, ignore.case=T) # list(a = 1, aA = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.