cash-set-.BibEntry: Replace values for a particular field in a BibEntry object

$<-.BibEntryR Documentation

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 replacement method for class 'BibEntry'
x$name <- value

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.

Value

an object of class BibEntry with the updated fields.

Note

The method expects date and name list fields to be in the format expected by Biblatex. The field specified by name does not have to be one currently in x.

See Also

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

Examples

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

mwmclean/RefManageR documentation built on Aug. 31, 2023, 2:11 p.m.