knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(dataobservatory, quietly = TRUE)

The dataset S3 class is an extension of the data frame and tibble class. It has some important metadata attributes that help the documentation of the dataset. Furthermore, it has an adequate print and summary method.

data("small_population")
small_population
small_population_dataset <- dataset (
  x= small_population,
  dataset_code = "small_population_total",
  dataset_title = "Population of Small European Countries",
  freq = "A",
  unit = "NR",
  unit_name = "number")

attributes (small_population_dataset)
print(small_population_dataset)
summary(small_population_dataset)
is.dataset(small_population_dataset)

Adding Metadata

The descriptive metadata can be added with the datacite() constructor (see: ?datacite ) or the datacite_dataset() helper function, or read the DataCite Descriptive Metadata vignette article.

The statistical processing information can be added with the not fully implemented codebook class. Read the The codebook Class vignette article.



dataobservatory-eu/dataobservatory documentation built on Jan. 7, 2022, 8:55 p.m.