checkkey {diffdfs} | R Documentation |
Check That A Dataframe Key Col Set Is Unique
Description
Checks that a provided vector of column names constitue a unique key (that is, no rows are duplicated) for a dataframe.
Usage
checkkey(df, key_cols, verbose = FALSE)
Arguments
df |
a dataframe |
key_cols |
vector of column names |
verbose |
TRUE/FALSE should we print a message? |
Value
TRUE if key cols have unique rows; FALSE if not
Examples
irisint = iris
irisint$rownum = 1:nrow(irisint)
key_cols = c("rownum")
checkkey(irisint, key_cols, TRUE)
checkkey(irisint, "Species", TRUE)
[Package diffdfs version 0.9.0 Index]