This function prepares a 'screener package': a set of files that one or more screeners can use to independently screen a set of bibliographic records.

write_screenerPackage(
  bibliographyDf,
  outputPath,
  screeners = c("a", "b"),
  screenerFieldsPrefix = "screener_",
  screenerFieldsSuffix = "_status",
  prevStageField = NULL,
  duplicateField = NULL,
  initializeScreenerFields = TRUE,
  basename = "screening_",
  silent = metabefor::opts$get("silent"),
  ...
)

Arguments

bibliographyDf

A dataframe with bibliographic entries

outputPath

The path where to write the screener package(s)

screeners

The unique identifiers to use for each screener; a character vector where each value represented one screener. This will be used for the directory and filenames as well as fields in the bibliographic database.

screenerFieldsPrefix, screenerFieldsSuffix

The pre- and suffixes to pre- and append to the screener identifier in the field names in the bibliographic database

prevStageField

A field containing information from previous screening stages

duplicateField

The field containing information about duplicates; if specified, information from this field is appended to whatever is already stored in the

initializeScreenerFields

Whether to copy the contents of the initialization field to the screener fields.

basename

The base name for the directories and files (appended with the screener identifiers)

silent

Whether to be silent or chatty.

...

Any additional arguments are passed to write_JabRef_Config().

Value

Invisibly, a results object with intermediate results and the written configuration file

Examples

### Get the path to a temporary directory
tempPath <- tempdir();

### Load an example bibliography
data("ebsco_example_1", package="metabefor");

### Write screener packages
metabefor::write_screenerPackage(
  ebsco_example_1,
  tempPath,
  screeners = c("A", "B")
);
#> Error in metabefor::write_screenerPackage(ebsco_example_1, tempPath, screeners = c("A",     "B")): To write a screener package, the `synthesisr` package is required! You can install it with:
#> 
#>   install.packages('synthesisr');

### Look at written files
list.files(tempPath);
#>  [1] "downlit"                         "filef5513234ad1c0"              
#>  [3] "filef55133303543a"               "filef551338bf91f8"              
#>  [5] "filef5513447da044"               "filef55135cc14dc5"              
#>  [7] "jabref.xml"                      "libloc_171_2b363be77582bd8f.rds"
#>  [9] "libloc_192_2fe1afcd91c8e392.rds" "rxsDirf5513361b79ba"            
#> [11] "screen.bat"                      "viewhtmlf55133be83f45"          

### Look at contents of "screening_A" directory
list.files(file.path(tempPath, "screening_A"));
#> character(0)