knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

dsinfo

lifecycle

A framework to add metadata to any R Object. This package does not provide any exciting functionality, but rather proposes a metadata standard for R objects. The main motivation behind this package was to provide a standardized way to store metadata with R objects that are saved to disk via saveRDS() and similar functions.

The metadata format is heavily inspired by Data Packages. However, dsinfo is not designed as a tool to work with actual Data Packages, for that purpose please take a look at datapackage-r.

Installation

You can install dsinfo from GitHub with:

# install.packages("devtools")
devtools::install_github("s-fleck/dsinfo")

Example

library(dsinfo)

x <- set_dsinfo(
  iris,
  id = "iris001",
  reference_date = Sys.Date(),
  name = "iris_dataset",
  title = "The Iris Dataset",
  version = "1.0",
  sources = dsi_sources(
    dsi_source("R demo data", path = "path/to/data", date = Sys.Date()),
    dsi_source("Alfred Bogus", email = c("alfred@bogus.xx", "alfred.bogus@yahoo.ru"))
  ),
  custom_metadata = "blubb",
  description = paste(rep("blah", 10), collapse = " "),
  homepage = "http://www.blah.bl"
)

dsinfo(x)


s-fleck/dsinfo documentation built on Oct. 25, 2020, 11:11 p.m.