powered by
Checks that a provided vector of column names constitue a unique key (that is, no rows are duplicated) for a dataframe.
checkkey(df, key_cols, verbose = FALSE)
TRUE if key cols have unique rows; FALSE if not
a dataframe
vector of column names
TRUE/FALSE should we print a message?
irisint = iris irisint$rownum = 1:nrow(irisint) key_cols = c("rownum") checkkey(irisint, key_cols, TRUE) checkkey(irisint, "Species", TRUE)
Run the code above in your browser using DataLab