Skip to contents

Get/set the optional Source property as an attribute to an R object. Do not confuse with the base R source() function.

Usage

datasource_get(x)

datasource_set(x, value, overwrite = TRUE)

Arguments

x

A dataset object created with dataset::dataset.

value

The Source as a character string of lengths one.

overwrite

If the attributes should be overwritten. In case it is set to FALSE,it gives a warning with the current datasource property instead of overwriting it. Defaults to FALSE.

Value

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

Details

The Source is a related resource from which the described resource is derived. See dct:source. In Datacite, the source is described by a relatedIdentifierType with the property relationType="isDerivedFrom".

See also

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

Examples

iris_dataset <- datasource_set(iris_dataset, "https://doi.org/10.1111/j.1469-1809.1936.tb02137.x")
datasource_get(iris_dataset)
#> [1] "https://doi.org/10.1111/j.1469-1809.1936.tb02137.x"