Created
October 12, 2017 17:55
-
-
Save muschellij2/838e33644e6714ada62ed28289123541 to your computer and use it in GitHub Desktop.
Making a CITATION file for R package from bibtex entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(bibtex) | |
x = "@article{shou2013quantifying, | |
title={Quantifying the reliability of image replication studies: the image intraclass correlation coefficient (I2C2)}, | |
author={Shou, H and Eloyan, A and Lee, S and Zipunnikov, V and Crainiceanu, AN and Nebel, MB and Caffo, B and Lindquist, MA and Crainiceanu, CM}, | |
journal={Cognitive, Affective, & Behavioral Neuroscience}, | |
volume={13}, | |
number={4}, | |
pages={714--724}, | |
year={2013}, | |
publisher={Springer} | |
}" | |
tfile = tempfile(fileext = "bib") | |
writeLines(x, con = tfile) | |
bib = bibtex::read.bib(tfile) | |
dir.create("inst", showWarnings = FALSE) | |
res = dput(bib, file = file.path("inst", "CITATION")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment