Replace values for a particular field in a BibEntry object
Source:R/BibEntryAssignOp.R
cash-set-.BibEntry.Rd
Used to replace the values stored for a specified field in a BibEntry object.
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
#> [1] M. W. McLean and R. J. Carroll. _My Work_. 2014.
#> <https://example.com>.
bib <- c(bib, as.BibEntry(citation()))
bib[1]$author[2] <- person(c("Raymond", "J."), "Carroll")
#> Error in eval(kal): object '*tmp*' not found
bib$author
#> $mclean
#> [1] "M. W. McLean" "R. J. Carroll"
#>
#> $`2024language`
#> [1] "R Core Team"
#>