create_annotation_file: Create an annotation data set ready for relevance...

create_annotation_fileR Documentation

Create an annotation data set ready for relevance classification.

Description

This function imports citation data, joins them and possibly reorder them in order to put on top records with a higher probability of being relevant given the search query. It also adds the fields needed in the data frame for the record manual classification. It provides the option to import already existing annotation data sets or previous classifications (without importing the data).

Usage

create_annotation_file(
  records,
  reorder_query = NULL,
  prev_records = NULL,
  prev_classification = NULL
)

Arguments

records

Either a vector of citation file paths and or folder containing such files, or a list of record data frames.

reorder_query

A boolean query (as characters) of keywords that can be used to empirically reorder records by putting on top those more probably identified by such query. Usually, the initial query used to collect records is used.

prev_records

A previously created data frame of records to join with the new ones, removing duplicates.

prev_classification

A previous set of labelled records from which import the classification, without importing the records themselves.

Value

A data frame of records ready for manual or automatic relevance classification.

Examples

## Not run: 
# This function extracts the appropriate file paths from a session journal.
# By default it passes all stored files, otherwise it can be filtered by
# session, query, and source (i.e., Pubmed, WOS, IEEE)
record_files <- extract_source_file_paths(journal)

# create_annotation_file() accept a great variety of inputs:

# either record file paths
input <- record_files

# or specific record file folders
input <- file.path("Records", "Session1", "Query1")

# or parent folders, since it searches for files recursively
input <- "Records"

# or the already parsed files
input <- read_bib_files(record_files)

# We can then call create_annotation_file() with one of the above input
Annotation_data <- create_annotation_file(input, reorder_query = query)

## End(Not run)

bakaburg1/BaySREn documentation built on March 30, 2022, 12:16 a.m.