Learn R Programming

dataset (version 0.3.1)

size: Get/Estimate/Add the Size metadata to an object

Description

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

Usage

size(x)

size(x, overwrite = TRUE) <- value

Value

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

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}.

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

Run this code
size(iris_dataset) <- "estimate"
size(iris_dataset)

Run the code above in your browser using DataLab