scientific writing app || blogdown citation hugo r RStudio

Announcing the R package coinsR

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 to provide 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 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 laboriously for every webpage was my motivation to write the R package coinsR for it.

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 am planning for a future version to loosen the last two limitations and allow it for config.yaml and TOML frontmatter (but not for .json).

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.

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

Page created: 2019-08-02 | Last modified: 2019-08-02
comments powered by Disqus