Description Usage Arguments Value Examples
This function will check if a identifier within a
data.frame
is unique. This is used, for example,
to ensure that merges are performed on a one-to-one or
one-to-many basis and not a many-to-many basis that might
cause problems
1 | check.unique(data, id = "ppn")
|
data |
data frame to check |
id |
character string of length 1 defining the column which contains the unique identifer |
logical TRUE if unique, FALSE if not.
1 2 3 4 | df.non <- data.frame(ppn = c(1L,1L,2L), var1 = seq_len(3))
df.unique <- data.frame(ppn = seq_len(3), var2 = seq_len(3))
check.unique(df.non, id = 'ppn')
check.unique(df.unique, id = 'ppn')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.