unique_identifier | R Documentation |
Create a unique identifier for each combination of fields in a data frame.
This unique identifier is unique for each combination of the elements of the fields.
The generated identifier is like a primary key or a secondary key on a table.
This is just a small wrapper around frank
unique_identifier(x, fields, start_from = 1L)
x |
a data.frame |
fields |
a character vector of columns from |
start_from |
integer number indicating to start from that number onwards |
an integer vector of the same length as the number of rows in x
containing the unique identifier
data(brussels_reviews_anno) x <- brussels_reviews_anno x$doc_sent_id <- unique_identifier(x, fields = c("doc_id", "sentence_id")) head(x, 15) range(x$doc_sent_id) x$doc_sent_id <- unique_identifier(x, fields = c("doc_id", "sentence_id"), start_from = 10) head(x, 15) range(x$doc_sent_id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.