Learn R Programming

dataset (version 0.3.1)

datasource_get: Get/set the source property of a dataset.

Description

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)

Value

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

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.

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

Run this code
iris_dataset <- datasource_set(iris_dataset, "https://doi.org/10.1111/j.1469-1809.1936.tb02137.x")
datasource_get(iris_dataset)

Run the code above in your browser using DataLab