Skip to contents

Access or assign the optional geolocation attribute to a semantically rich dataset object.

Usage

geolocation(x)

geolocation(x, overwrite = TRUE) <- value

Arguments

x

A dataset object created by dataset_df() or dataset::as_dataset_df().

overwrite

Logical. If TRUE (default), the existing geolocation attribute is replaced with value. If FALSE, the function returns a message and does not overwrite the existing value.

value

A character string specifying the geolocation.

Value

A character string of length 1, representing the geolocation attribute attached to x.

Details

The geolocation field describes the spatial region or named place where the data was collected or that the dataset is about. This field is recommended for data discovery in DataCite Metadata Schema 4.4.

See: DataCite: Geolocation Guidance

See also

Other bibliographic helper functions: contributor(), creator(), dataset_format(), dataset_title(), description(), get_bibentry(), language, publication_year(), publisher(), relation(), rights(), subject()

Examples

orange_dataset <- orange_df
geolocation(orange_df) <- "US"
geolocation(orange_df)
#> [1] "US"

geolocation(orange_df, overwrite = FALSE) <- "GB"
#> The dataset has already an Geolocation: US