Learn R Programming

knitcitations (version 0.4-7)

citet: Add a textual citation

Description

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

Usage

citet(x, cito = NULL,
    tooltip = get("tooltip", envir = knitcitations_options),
    linked = get("linked", envir = knitcitations_options),
    numerical = get("numerical", envir = knitcitations_options),
    format_inline_fn = format_authoryear_t,
    inline_format = authoryear_t, page = NULL)

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
tooltip
Show a citation information on mouseover. Requires the tooltip javascript from http://twitter.github.com/bootstrap Pass logical TRUE/FALSE or set default behavior with cite_options
linked
link the inline citation text to the resource by doi (if available) or url? Pass logical TRUE/FALSE or set default behavior with cite_options
numerical
use citation instead of author-year format? (Not functional yet!) Pass logical TRUE/FALSE or set default behavior with cite_options
format_inline_fn
function to format a single inline citation
inline_format
a function for formating the inline citation, defaults to authoryear_t (designed for internal use only)
page
optional page range added after citation

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