Bundle of convenience functions for papis workflows in R.
Provides some convenience functions for papis workflows in R. Papis is a ‘powerful and highly extensible command-line based document and bibliography manager’. The package does not actually require papis
to be installed in order for its functions to work.
## Installs and loads papisr
::install_github("stasvlasov/papisr")
devtoolslibrary("papisr")
Suppose you have a papis library located in testdata/papis
that includes 4 simple bibliographic records (see below for the content of files). This example papis library is provided with the package and accessible with system.file()
Now, for example, if you want to tabulate year
and url
fields and number of tags
for each record that is not tagged as ‘classics’ you can do it with the following simple script:
system.file("testdata", "papis", package = "papisr") |>
::collect_papis_records(!("classics" %in% info$tags)) |>
papisr::tabulate_papis_records(`Year` = info$year
papisr`URL` = info$url
, `No. of tags` = length(info$tags)) ,
The script returns the following data.frame:
Year | URL | No. of tags |
---|---|---|
2022 | example.com | 2 |
1985 | uvt.nl | 2 |
2222 | 1 |
Here 3 out of 4 records were tabulated because the one records with tag
“classics” was filtered out.