Learn R Programming

knitcitations (version 0.6-2)

citet: Add a textual citation

Description

Parameters listed here are the same for parenthetical citation, citep.

Usage

citet(x, cito = NULL, ..., citation_format = getOption("citation_format",
  "compatibility"))

Arguments

x
a doi or list of dois, or a bibentry (or list of bibentries)
cito
Semantic reason for the citation. Only active if linked=TRUE
...
additional arguments (dependent on citation_format).
citation_format
name of the citation format to use. Currently available options are "pandoc" or "compatibility".

Value

  • a text inline citation

Details

Stores the full citation in a "works_cited" list, which can be printed with bibliography. A variety of reasons for the citation can be provided following the CiTO ontology: c("cites","citesAsAuthority", "citesAsMetadataDocument", "citesAsSourceDocument","citesForInformation", "isCitedBy","obtainsBackgroundFrom", "sharesAuthorsWith", "usesDataFrom", "usesMethodIn", "confirms", "credits", "extends", "obtainsSupportFrom", "supports", "updates", "corrects", "critiques", "disagreesWith", "qualifies", "refutes", "discusses", "reviews")

Examples

Run this code
library(knitcitations)
 citet("10.3998/3336451.0009.101")
 ## Read in the bibtex information for some packages:
 knitr <- citation("knitr")
 citet(knitr)
 # generate the full bibliography:
 bibliography()
## Assign a citation key to a doi and then use it later:
citet(c(Halpern2006="10.1111/j.1461-0248.2005.00827.x"))
citet("Halpern2006")

Run the code above in your browser using DataLab