Skip to contents

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

Usage

version(x)

version(x, overwrite = FALSE) <- value

Arguments

x

An R object, such as a data.frame, a tibble, or a data.table.

overwrite

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

value

The Version as a character set.

Value

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

Details

Version is an optional property in DataCite 4.4. See: datacite:Size. It is not part of the "core" Dublin Core terms, but ... Dublin Core metadata terms.

See also

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

Examples

iris_dataset <- iris
version(iris_dataset) <- "1.0"
version(iris_dataset)
#> [1] "1.0"