pre_process: A helper function to streamline pre-processing workflow

pre_processR Documentation

A helper function to streamline pre-processing workflow

Description

This function is used to prepare data for automatic coding.

Usage

pre_process(
  path,
  ID,
  game = "Blank",
  panels = c("A", "B"),
  pre_processed = FALSE,
  automate = FALSE,
  reference = NULL,
  d_x = 20,
  d_y = 20
)

Arguments

path

Full path to main folder.

ID

Unique ID of focal individual/respondent.

game

ID for case/game/question.

panels

ID codes used to distinguish photographs of the different boards/panels/frames from the same person and game.

pre_processed

Are photographs pre-processed such that image correction steps can be skipped? If FALSE, then user must pre-process images using DieTryings tools. If TRUE game board photographs must be cropped and unskewed. Some Android and IOS apps, like Tiny Scanner, provide a means of producing such photographs of the game boards at the time of data collection.

automate

will corners be selected manually, or automatically?

reference

path to the reference set.

d_x

x width of kernel used to scan for corners

d_y

y width of kernel used to scan for corners

Value

A list of length 2. The first slot contains image files. The second slot contains the locations of game-board corners.

Examples

## Not run: 
filled = vector("list", 26)
filled[[1]] = pre_process(path=path, ID="QQQ", game="Blank", panels=c("A","B"))
                   
## End(Not run)

ctross/DieTryin documentation built on Sept. 8, 2024, 8:07 p.m.