Retrieve or assign the main title of a dataset, typically used
as the primary label in metadata exports (e.g., DataCite or Dublin Core).
Usage
dataset_title(x)
dataset_title(x, overwrite = FALSE) <- value
Value
dataset_title() returns the current dataset title as a character
string. dataset_title<-() returns the updated dataset object (invisible).
Arguments
x
A dataset object created by dataset_df() or as_dataset_df().
overwrite
Logical. If TRUE, the existing title is replaced. If
FALSE (default) and a title is already present, a warning is issued and
the title is not changed.
value
A character string representing the new title. If NULL, a
placeholder value ":tba" is assigned. If value is a character vector of
length > 1, an error is raised.
dataset_title(orange_df)
# Set a new title with overwrite = TRUEdataset_title(orange_df, overwrite = TRUE) <- "The Growth of Orange Trees"dataset_title(orange_df)