Skip to contents

Add the optional DataCite Size property as an attribute to an R object.

Usage

size(x)

size(x, overwrite = TRUE) <- value

Arguments

x

A dataset object created with dataset::dataset.

overwrite

If a warning should be given when trying to overwrite an existing Size property, defaults to TRUE.
The estimated object size in memory is added in SI kB and IEC KiB (legacy Kb) units, rounded to two decimals.

value

A string (size of the dataset in a certain serialisation), or "estimate" produces and estimate with [utils]{object.size}.

Value

Returns the size metadata field of the DataBibentry of the dataset.

Details

Size is an optional property in DataCite 4.4. See: datacite:Size. The object size is estimated with utils::object.size and it may differ from the actual serialisation to another file format.

See also

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

Examples

size(iris_dataset) <- "estimate"
size(iris_dataset)
#> [1] "40.71 kB [39.76 KiB]"