build_survey | R Documentation |
This function allows you to speed up data collection and photo randomization. Simply set a path to the main folder. Set the number of panels, and the number of rows and cols per panel. Then run the function. This function relies on 'xtable' to create a survey tool, and compile to PDF using LaTeX. The user must have a LaTeX build on the system path.
build_survey(
path,
pattern = ".jpg",
start = 1,
stop = 3,
n_panels = 4,
n_rows = 5,
n_cols = 8,
seed = 1,
ordered = NULL
)
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. |
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 cols per panel. With 7cm x 10cm photos, I use six to eight cols of photos per panel. |
seed |
A seed for the random number generator to sort the order of photos in the array. |
ordered |
A list of IDs in explicit order. Can be used to overide random sorting. |
## Not run:
build_survey(path=path, pattern=".jpg", start=1, stop=3,
n_panels=2, n_rows=4, n_cols=5, seed=1,
ordered = sorted_ids)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.