Learn R Programming

dataset (version 0.4.1)

geolocation: Get or Set the Geolocation of a Dataset Object

Description

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

Usage

geolocation(x)

geolocation(x, overwrite = TRUE) <- value

Value

A character string of length 1, representing the geolocation

attribute attached to x.

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.

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

Run this code
orange_dataset <- orange_df
geolocation(orange_df) <- "US"
geolocation(orange_df)

geolocation(orange_df, overwrite = FALSE) <- "GB"

Run the code above in your browser using DataLab