如何在 R markdown 的引用中仅提供年份?
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)。
问题:如何才能return只在引用中注明年份(因为我已经在文中注明了作者)?
在他的著作 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]
returns:
(2012)
有关更多详细信息,请参阅有关引用的 rmarkdown 文档 http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html
我的 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)。
问题:如何才能return只在引用中注明年份(因为我已经在文中注明了作者)?
在他的著作 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]
returns:
(2012)
有关更多详细信息,请参阅有关引用的 rmarkdown 文档 http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html