orange_copy <- orange_df
# Get the current identifier
identifier(orange_copy)
# Set a new identifier (e.g., a DOI)
identifier(orange_copy) <- "https://doi.org/10.9999/example.doi"
# Prevent accidental overwrite
identifier(orange_copy, overwrite = FALSE) <- "https://example.org/id"
# Use numeric and NULL values
identifier(orange_copy) <- 12345
identifier(orange_copy) <- NULL # Sets ":unas"
Run the code above in your browser using DataLab