R missing bib key in citation() output -
i using citation() automatically bib entries r packages. however, output not have key.
example:
utils:::print.bibentry(citation(), style = "bibtex") output:
@manual{, title = {r: language , environment statistical computing}, author = {{r core team}}, organization = {r foundation statistical computing}, address = {vienna, austria}, year = {2017}, url = {https://www.r-project.org/}, }
i this:
@manual{mykey999, title = {r: language , environment statistical computing}, author = {{r core team}}, organization = {r foundation statistical computing}, address = {vienna, austria}, year = {2017}, url = {https://www.r-project.org/}, }
i've tried same command "key" argument changes nothing:
utils:::print.bibentry(citation(), style = "bibtex", key= "mykey0") any idea?
you can
z = citation() z$key = "hullo" print(z, "bibtex") which gives
@manual{hullo, title = {r: language , environment statistical computing}, author = {{r core team}}, organization = {r foundation statistical computing}, address = {vienna, austria}, year = {2017}, url = {https://www.r-project.org/}, } alternately, there's silly one-liner:
print(`$<-`(citation(), key, "hullo"), "bibtex") i guess using ::: access print (as in op) overkill here. if looking @ internals, though, maybe have gander @ utils:::`$<-.bibentry`. there, can see expected assignments to...
utils:::bibentry_attribute_names # [1] "bibtype" "textversion" "header" "footer" "key"
Comments
Post a Comment