Learn R Programming

RefManageR (version 1.4.0)

$<-.BibEntry: Replace values for a particular field in a BibEntry object

Description

Used to replace the values stored for a specified field in a BibEntry object.

Usage

# S3 method for BibEntry
$(x, name) <- value

Value

an object of class BibEntry with the updated fields.

Arguments

x

a BibEntry object

name

string; the field to assign the new values to.

value

character vector; the replacement field values to be assigned.

See Also

Other operators: $.BibEntry(), +.BibEntry(), [.BibEntry(), [<-.BibEntry(), [[.BibEntry(), [[<-.BibEntry(), c.BibEntry()

Examples

Run this code
bib <- BibEntry(bibtype = "misc", key = "mclean", author = "Mathew W. McLean", 
  title = "My Work", year = "2012")
bib$year <- 2014
bib$author <- "McLean, M. W. and Carroll, R. J." 
bib$url <- "https://example.com"
bib

bib <- c(bib, as.BibEntry(citation()))
bib[1]$author[2] <- person(c("Raymond", "J."), "Carroll")
bib$author

Run the code above in your browser using DataLab