R/read_cff.R

Defines functions read_cff

Documented in read_cff

#' read_cff
#' 
#' Read a citation file format  file (https://citation-file-format.github.io/)
#' 
#' @param file path to the citation file
#' @author Jan Philipp Dietrich
#' @importFrom yaml read_yaml
#' @export

read_cff <- function(file) {
  cff <- read_yaml(file, fileEncoding="")
  if(is.numeric(cff$version)) cff$version <- format(cff$version,nsmall=1)
  return(cff)
}

Try the citation package in your browser

Any scripts or data that you put into this service are public.

citation documentation built on March 31, 2023, 11:31 p.m.