[英]How do I provide only the year in a citation in R markdown?
我的rmarkdown腳本如下所示:
---
title: "Untitled"
author: "me"
date: '`r format(Sys.time(), "%d %B, %Y")`'
output:
pdf_document: default
bibliography: bibliography.bib
---
In his book Helsel explains how to approach censored environmental data [@helsel_statistics_2012].
我的.bib文件如下:
@book{helsel_statistics_2012,
address = {Hoboken, N.J},
edition = {2nd ed},
series = {Wiley series in statistics in practice},
title = {Statistics for censored environmental data using {Minitab} and {R}},
isbn = {978-0-470-47988-9},
publisher = {Wiley},
author = {Helsel, Dennis R.},
year = {2012},
note = {00003 OCLC: ocn748290711},
keywords = {Environmental sciences, Measurement Statistical methods, Minitab, Pollution, R (Computer program language), Statistical methods},
}
當我編織文件時,我得到以下輸出:
在他的書中,Helsel解釋了如何處理審查的環境數據(Helsel 2012)。
問題:如何僅在引文中返回年份(因為我已經在文中說明了作者)?
在他的書中,Helsel (2012)解釋了如何處理審查的環境數據。
在rmarkdown(.Rmd)文件中輸入以下內容(注意從[@ helsel_statistics_2012]中刪除[]括號):
In his book @helsel_statistics_2012 explains how to approach censored environmental data.
一旦渲染,這將為您提供所需的輸出:
In his book Helsel (2012) explains how to approach censored environmental data.
如果你真的只想要引用年份那么:
[-@helsel_statistics_2012]
收益:
(2012)
有關詳細信息,請參閱引文上的rmarkdown文檔http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.