is_id | R Documentation |
by
variablereport if dt is uniquely identified by by
var or, if report = TRUE, the duplicates in by
variable
is_id(
dt,
by,
verbose = getOption("joyn.verbose", default = FALSE),
return_report = FALSE
)
dt |
either right of left table |
by |
variable to merge by |
verbose |
logical: if TRUE messages will be displayed |
return_report |
logical: if TRUE, returns data with summary of duplicates.
If FALSE, returns logical value depending on whether |
logical or data.frame, depending on the value of argument return_report
library(data.table)
# example with data frame not uniquely identified by `by` var
y <- data.table(id = c("c","b", "c", "a"),
y = c(11L, 15L, 18L, 20L))
is_id(y, by = "id")
is_id(y, by = "id", return_report = TRUE)
# example with data frame uniquely identified by `by` var
y1 <- data.table(id = c("1","3", "2", "9"),
y = c(11L, 15L, 18L, 20L))
is_id(y1, by = "id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.