Skip to contents

Adds or retrieves the optional "rights" attribute of a dataset object. This field contains information about intellectual property or usage rights.

Usage

rights(x)

rights(x, overwrite = FALSE) <- value

Arguments

x

A semantically rich data frame created with dataset_df() or as_dataset_df().

overwrite

Logical. Should the existing value be replaced? If FALSE and a value already exists, the function emits a message instead of overwriting. Defaults to FALSE.

value

A character string specifying the rights (e.g., "CC-BY-4.0").

Value

The "rights" attribute of the dataset as a character string (length 1). When assigning, the updated object x is returned invisibly.

Details

The "rights" field corresponds to dct:rights from Dublin Core, and to rights in DataCite.

Rights information typically includes statements about legal ownership, licensing, or usage conditions. It helps ensure that users understand how a dataset may be reused, cited, or shared.

See also

Examples

rights(orange_df) <- "CC-BY-SA"
#> The dataset has already a rights field: :tba
rights(orange_df)
#> [1] ":tba"