Extract entries from a BibEntry object by index
Source:R/BibEntryListExtract.R
sub-sub-.BibEntry.Rd
Operator for extracting BibEntry objects by index.
Note
This method is different than the usual operator [[
for lists in that a vector of indices may be specified.
This method behaves differently than the [
operator for BibEntry objects in that it does not expand
crossreferences when returning, so that a parent entry or xdata entry will be dropped if it is not also indexed
when indexing the child entry.
This method is not affected by the value of BibOptions()$return.ind
.
See also
Other operators:
$.BibEntry()
,
$<-.BibEntry()
,
+.BibEntry()
,
[.BibEntry()
,
[<-.BibEntry()
,
[[<-.BibEntry()
,
c.BibEntry()
Examples
if (requireNamespace("bibtex")) {
file.name <- system.file("Bib", "biblatexExamples.bib", package="RefManageR")
bib <- suppressMessages(ReadBib(file.name))
bib[[20:21]]
bib[c("hyman", "loh")]
## Note this is FALSE because [[ does not inherit from the dropped parent entry while [ does.
identical(bib[1], bib[[1]])
}
#> [1] FALSE