https://github.com/s-fleck/dsinfo
A metadata standard for R Objects
https://github.com/s-fleck/dsinfo
Last synced: 30 days ago
JSON representation
A metadata standard for R Objects
- Host: GitHub
- URL: https://github.com/s-fleck/dsinfo
- Owner: s-fleck
- License: other
- Created: 2018-04-18T09:38:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-19T10:54:51.000Z (over 4 years ago)
- Last Synced: 2025-03-24T12:09:55.157Z (30 days ago)
- Language: R
- Homepage:
- Size: 42 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - s-fleck/dsinfo - A metadata standard for R Objects (R)
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# dsinfo[](https://www.tidyverse.org/lifecycle/#maturing)
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](https://frictionlessdata.io/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](https://github.com/frictionlessdata/datapackage-r).## Installation
You can install dsinfo from GitHub with:
```{r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("s-fleck/dsinfo")
```## Example
```{r}
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)```