is_candidate_key | R Documentation |
Checks if all elements of the atomic vector x
, or the combination of
all elements of x
if x
is a list
, are unique and neither NA
or
infinite
.
is_candidate_key(x)
x |
a atomic vector or a list of atomic vectors |
TRUE/FALSE
is_candidate_key(c(1, 2, 3))
is_candidate_key(c(1, 2, NA))
is_candidate_key(c(1, 2, Inf))
td <- data.frame(
x = 1:10,
y = 1:2,
z = 1:5
)
is_candidate_key(list(td$x, td$z))
# a data.frame is just a special list
is_candidate_key(td[, c("y", "z")])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.