Announcing the R package coinsR

Paper with heading 'Announcement' fixed in an old mechanical typewriter. Image by Markus Winkler from Pixabay
Update 2021-05-21: Because of some breaking changes in the Hugo site structure and management in the last three years, coinsR works at the moment only with individual pages.

This blog entry announces the R program coinsR to produce bibliographic metadata automatically for websites within the Hugo framework. The dominant use case at the moment is with the blogdown package.

In a previous blog entry I wrote about the advantages of providing bibliographic metadata for your web pages producing COinS. COinS is the abbreviation of Context Objects in Spans. It refers to a microformat standard to embed bibliographic metadata as HTML.

A COinS string includes HTML code for all the information necessary to cite a publication correctly. It works for every type of writing (books, papers, web pages). COinS embedded in your HTML pages help your blog readers or website visitors to cite your posts and pages correctly.

I wrote also a detailed tuorial how to produce COinS with the help of the free bibliographical research tool Zotero. But this is a quite complicated procedure with several steps. Besides, it works only for every page individually and not automatically for all blog entries of your website.

To produce COinS for every web page quickly was my motivation to write the R package coinsR.

Use cases of coinsR and its limitations

The package requires:

  1. Hugo with the R package blogdown
  2. Config file in the TOML format (config.toml)
  3. Blog entries with YAML frontmatter

I plan for a future version to loosen the last two limitations and allow config.yaml and TOML frontmatter (but not for .json).

Update 2021-05-21: This plan is still relevant: I would like to loosen some restrictions and improve the user interface.

You can call coinsR via an RStudio Addin for every page individually. But you can also produce COinS automatically for all files under a specific directory.

Where to find coinsR and how to install it?

You can download the package from Github with

remotes::install_github('petzi53/coinsR', build_vignettes = TRUE)

I am trying to prepare coinsR as an R package distributed via the CRAN repository. But as I am still not very experienced in R programming, I am not sure if I will succeed.

You will find a detailed description in the help file and the vignette description of how to invoke the two functions coins_this() and coins_all().

Edit this page

Peter Baumgartner
Peter Baumgartner
Retired Professor of Technology Enhanced Learning (TEL)

My research interests include eLearning, educational technology, educational design, open science and data science education.


Related