Skip to contents

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

Usage

publication_year(x)

publication_year(x, overwrite = TRUE) <- value

Arguments

x

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

overwrite

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

value

The publication_year as a character set.

Value

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

Details

The PublicationYear is the year when the data was or will be made publicly available in YYYY format.

See also

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

Examples

iris_dataset <- iris
publication_year(iris_dataset) <- 1935
publication_year(iris_dataset)
#> [1] 1935