Learn R Programming

dataset (version 0.3.1)

geolocation: Get/set the Geolocation of the object.

Description

Get/set the optional Geolocation property as an attribute to an R object.

Usage

geolocation(x)

geolocation(x, overwrite = TRUE) <- value

Value

The Geolocation attribute as a character of length 1 is added to x.

Arguments

x

A dataset object created with dataset::dataset.

overwrite

If the attributes should be overwritten. In case it is set to FALSE, it gives a message with the current Geolocation property instead of overwriting it. Defaults to TRUE when the attribute is set to value regardless of previous setting.

value

The Geolocation as a character string.

Details

The Geolocation is recommended for discovery in DataCite 4.4. Spatial region or named place where the data was gathered or about which the data is focused. See: datacite:Geolocation.

See Also

Other Reference metadata functions: creator(), datasource_get(), description(), identifier(), language, publication_year(), publisher(), rights(), size(), version()

Examples

Run this code
iris_dataset <- iris
geolocation(iris_dataset) <- "US"
geolocation(iris_dataset)

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

Run the code above in your browser using DataLab