build_roster: A function to automatically build a photo roster for data...

View source: R/build_roster.R

build_rosterR Documentation

A function to automatically build a photo roster for data collection

Description

This is a helper function to plot the roster. Posters are saved in the "Survey" folder.

Usage

build_roster(
  path,
  pattern = ".jpg",
  start = 1,
  stop = 3,
  seed = 1,
  n_panels = 4,
  n_rows = 5,
  n_cols = 8,
  ordered = NULL,
  size_out = 1000,
  chip_width = 300,
  asr = 1.618,
  width = 2.5
)

Arguments

path

Full path to main folder.

pattern

File extension of photos. Should be ".jpg" or ".JPG".

start

Location of start of PID in file name. If files are saved as "XXX.jpg" for example, this is 1.

stop

Location of end of PID in file name. If files are saved as "XXX.jpg" for example, this is 3.

seed

A seed for the random number generator to sort the order of photos in the array. This should match the seed used to make the survey.

n_panels

Number of frames/panels/blocks of photos to be output. I use four big panels and randomize order at each game.

n_rows

Number of rows per panel. With 7cm x 10cm photos, I use five rows of photos per panel.

n_cols

Number of rows per panel. With 7cm x 10cm photos, I use six to eight cols of photos per panel.

ordered

A list of IDs if photograph order is to be explicilty coded. This overwrites random sorting, otherwise NULL.

size_out

Width of standardized photos (pixels).

chip_width

Width at which reference chip should be printed (pixels).

asr

Aspect ratio of each photo.

width

Width at which each photo on the poster should be printed (inches).

Examples

## Not run: 
 build_roster(path, pattern=".jpg", start=1, stop=3, n_panels=4, n_rows=6, n_cols=14, 
             size_out=1000, chip_width=300, asr=1.6180, width = 2.5, seed=1, ordered = NULL )
                   
## End(Not run)

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