reallocate_randomly: Randomly reassign a set of articles amongst a set of users...

reallocate_randomlyR Documentation

Randomly reassign a set of articles amongst a set of users for coding

Description

reallocate_randomly reassigns a set of already existing articles amongst a set of users for them to code in the election violence database. By default allocation_ids and user ids are checked against the database and codes which do not correspond to existing assignments and/or users are ignored.

Usage

reallocate_randomly(
  user_ids,
  user_doc_ids,
  allocated_by = "reallocate_randomly",
  allocation_type = "coding",
  restrict_to_actual = TRUE,
  make_assignments = TRUE,
  force = FALSE
)

Arguments

user_ids

The users to allocate the articles amongst (vector with single or multiple user_ids).

user_doc_ids

The set of documents which are to be allocated (vector with single or multiple of document_ids).

allocated_by

The value to write to the allocated_by field in the database document_allocations table.

restrict_to_actual

Should the restriction to actual users and documents be enforced. Should only be set to FALSE for debugging purposes.

make_assignments

Actually make changes to the database (TRUE) or only create a proposed set of changes as a dataframe (FALSE)

force

Make changes even if usual conditions are violated (status=="NEW", allocation_type=="coding")


gidonc/durhamevp documentation built on April 8, 2022, 10:31 a.m.