filter_refs | R Documentation |
filter_refs()
is a convenience function I wrote for
filtering a data frame of citations returning the entries as a valid
.bib
entry (as a character vector). I wrote this for more easily passing
on citations to the print_refs()
function also included in this package.
filter_refs(bibdat, criteria, type = "bibtexkey")
bibdat |
a data frame of citations, like the one created by the bib2df package |
criteria |
criteria, specified as a character vector, by which to filter the data frame of citations |
type |
the particular type of citation entry on which to filter.
Defaults to "bibtexkey" (which filters based on a column of unique citation
keys). When |
filter_refs()
assumes some familiarity with BibTeX
, .bib
entries, and depends on the bib2df package.
filter_refs()
takes a data frame of citations, like the one
created by the bib2df package, and returns a character vector
(amounting to a valid .bib
entry) of citations the user wants. This can
then be easily passed to the print_refs()
function also included in this
package.
# Based on `stevepubs` configuration, filter on `BIBTEXKEY` where
# the citation key matches one of these.
filter_refs(stevepubs, c("miller2017etst", "miller2017etjc", "miller2013tdpi"))
# Based on `stevepubs` configuration, filter on `YEAR` where
# the publication year is 2017, 2018, 2019, 2020, or 2021.
filter_refs(stevepubs, c(2017:2021), type = "year")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.