Learn R Programming

knitcitations (version 0.6-2)

create_bibkey: generate bibkeys for unamed bibentry objects

Description

create_bibkey generates a key using a LastNameYear format or given key.

Usage

create_bibkey(bibentry, key = NULL, current = NULL, add_numeral = FALSE)

Arguments

bibentry
a bibentry object without a bibkey
key
the key to use as the bibkey. Defaults to NULL, in which case the function constructs its own key using LastNameYear format (from first author).
current
a list of currently existing citations, such as the output from 'bibliography()', which will force 'create_bibkey' to generate a unique pattern.

Value

  • an updated bibentry that now has a key value and is named using its key

Examples

Run this code
r <- ref("10.3998/3336451.0009.101")
 print(r, "Bibtex")
## Notice it now has a key entry
 print(r, "Bibtex")

Run the code above in your browser using DataLab